docs/reference/options

Reference

Options

The options conversions take. Each conversion takes only some of them, each with its own range and default. See them for one conversion in Conversions.

Pass an option

In cv, pass an option as --opt key=value. --pages, --password and --dpi are also flags of their own. In the API, options go in the job's options.

An option a conversion does not take, or a value outside its range, fails with invalid_options, and the message names the options the conversion takes. A switch set to false is the same as leaving it out. cv targets <file> --json lists each conversion's options with the range and default it uses.

Terminal
$ export CV_API_KEY=cv_sk_…

Set your key once. Every cv command reads it.

Terminal
$ cv convert photo.png web.webp --opt quality=80 --opt strip=true
stderrweb.webp (48120 bytes) -> web.webp

All options

OptionTakes
pagesTextPage range to read, for example 1-3,7. Also --pages.
passwordTextPassword for an encrypted input. Also --password.
dpiWhole number from 36 to 600Raster resolution in dots per inch. Also --dpi.
qualityWhole number from 1 to 100Lossy compression quality.
page_sizea4, letter, autoOutput page size.
frame_durationNumber from 0.04 to 600Seconds each image is shown when composing images into video.
fitpad, crop, scaleHow frames of different sizes are normalized.
compressionscreen, ebook, printerPDF size preset. screen is the smallest, printer keeps the most detail.
pdfa1, 2, 3PDF/A conformance level to produce.
encrypt_passwordTextPassword that protects the output PDF.
rotate90, 180, 270Degrees to rotate clockwise.
widthWhole number from 1 to 20,000Width in pixels. The height follows the aspect ratio unless height is also given.
heightWhole number from 1 to 20,000Height in pixels. The width follows the aspect ratio unless width is also given.
max_widthWhole number from 1 to 20,000Shrink to fit inside this width in pixels, keeping the aspect ratio. Smaller stays as it is.
max_heightWhole number from 1 to 20,000Shrink to fit inside this height in pixels, keeping the aspect ratio. Smaller stays as it is.
striptrue or falseRemove metadata such as EXIF and color profiles.
trim_startNumber from 0 to 86,400Seconds to cut from the start of audio or video.
trim_endNumber from 0 to 86,400Second at which the audio or video stops.
frame_atNumber from 0 to 86,400Seconds into the video to take the picture from. The first frame when left out.
audio.bitrateWhole number from 32 to 320Audio bitrate in kbit/s.
video.codech264, h265, vp9, av1, copyVideo codec to encode with. copy keeps the stream as it is when the container allows it.
video.fpsNumber from 1 to 120Frames per second to encode the video or animation at.
video.crfWhole number from 0 to 63Constant rate factor. Lower keeps more detail and makes a bigger file.
video.mutetrue or falseDrop the audio track.
speedNumber from 0.25 to 4Playback speed multiplier. 2 plays twice as fast.
audio.sample_rateWhole number from 8,000 to 192,000Audio sample rate in Hz.
audio.channelsWhole number from 1 to 8Number of audio channels. 1 is mono, 2 is stereo.
audio.normalizetrue or falseNormalize loudness to -16 LUFS as streaming services do.
audio.denoisetrue or falseReduce steady background noise.
audio.bit_depth16, 24Bits per sample for uncompressed and lossless audio. Kept from the input when left out.
ocrauto, on, offHow to read scanned pages and images: on recognizes their text, off reads only an existing text layer, auto recognizes it when language or deskew is set.
languageTextLanguages of the text to recognize, as comma-separated codes from en, ko, ja, zh, zh-TW.
deskewtrue or falseStraighten pages that were scanned at a slight angle.
font.charactersTextKeep only the glyphs needed for these characters when subsetting a font.
font.unicodesTextUnicode ranges to keep when subsetting a font, for example U+0020-007E,U+AC00-D7A3.
font.axesTextPin variable font axes to make a static instance, for example wght=700,wdth=100.
losslesstrue or falseEncode without loss where the format allows it.
linearizetrue or falseRearrange the PDF so the first page shows before the whole file has loaded.
flattentrue or falseBurn form fields and annotations into the page content.
grayscaletrue or falseConvert colors to shades of gray.
watermarkTextText stamped diagonally across every page.
page_numberstrue or falsePrint "page N of M" at the bottom of every page.
nup2, 4, 6, 8, 9, 16Pages per sheet.
levelWhole number from 1 to 9Compression level. Higher is smaller and slower.
slidestrue or falseWrite the HTML as a reveal.js slide deck, one slide per heading.
readabletrue or falseKeep only the main article text of a web page, dropping menus, ads and footers.
optimizetrue or falseRecompress losslessly to make the file smaller without changing the pixels or shapes.
repairtrue or falseFix holes, flipped normals and stray facets in a mesh.
sheetTextName or number, counting from 1, of the one worksheet to convert. Every worksheet when left out.
delimitercomma, semicolon, tab, pipeCharacter between the fields. Guessed from the rows when left out.
highlight_editstrue or falseMark what the edits change so people can see it, such as a fill on the changed cells.
comparetrue or falseWith two Word documents, the original and then the revised one, write the original with the tracked changes that turn it into the revised one, instead of joining them.
track_changestrue or falseWrite the edits' text changes as tracked changes, which a person accepts or rejects in Word, instead of changing the text directly.
authorTextName written as the author of the tracked changes and comments the edits make, such as a person or a team; convert.dev when left out.
dateTextDate and time written on the tracked changes and comments the edits make, as YYYY-MM-DDThh:mm:ssZ in UTC; none when left out.
initialsTextInitials written on the comments the edits make; the first letters of the author's name when left out.
backgroundTextColor that fills transparent areas, written as #RRGGBB.
framesfirst, allFrames of an animation to convert: the first one, or every frame.

Updated 3 November 2026