---
name: "dub-convert"
section: "1"
platform: "linux"
package: "dub"
version: "1.42.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/dub-convert"
---

# dub-convert(1)

Converts the file format of the package recipe.

## NAME

dub-convert - Converts the file format of the package recipe.

## SYNOPSIS

**dub convert** *OPTIONS...*

## DESCRIPTION

This command will convert between JSON and SDLang formatted package recipe files.

Warning: Beware that any formatting and comments within the package recipe will get lost in the conversion process.

## OPTIONS

- **-f**, **--format**=*VALUE*

  Specifies the target package recipe format. Possible values:\
     json, sdl

- **-s**, **--stdout**

  Outputs the converted package recipe to stdout instead of writing to disk.

### COMMON OPTIONS

See [**dub**(1)](/dub/1.md)

## EXIT STATUS

- **0**

  DUB succeeded

- **1**

  usage errors, unknown command line flags

- **2**

  package not found, package failed to load, miscellaneous error

## FILES

*dub.sdl*, *dub.json*

## AUTHOR

Copyright (c) 1999-2026 by The D Language Foundation

## ONLINE DOCUMENTATION

http://code.dlang.org/docs/commandline

## SEE ALSO

[**dub**(1)](/dub/1.md), [**dub-add**(1)](/dub-add/1.md), [**dub-init**(1)](/dub-init/1.md)
