Document Conversion Command-Line Utility

The ConvertAPI CLI is a command-line utility that brings ConvertAPI’s robust document conversion and manipulation features straight into your terminal or shell scripts. Designed for speed and simplicity, it supports hundreds of file formats—ranging from PDFs and Office documents to images—allowing you to seamlessly transform, merge, compress, or redact files without writing any additional code.

GitHub

Integrate within minutes

It is easy to start converting documents using CLI in a few simple steps:

1

Sign up for a free account

Sign up for free and receive 250 conversions to try and evaluate our service. You will receive a free trial with no credit card required upon registration!

2

Set up the conversion online

On your account dashboard you will access an intuitive UI tool that allows you to set up the conversion, adjust the parameters, and try the conversion online with zero code.

3

Copy auto-generated code snippet

Once you have set up the conversion parameters and are happy with the conversion results, you will receive an auto-generated CLI code snippet with your custom parameters!

Get started now

Document management toolkit for CLI

With minimal overhead and a straightforward workflow, the ConvertAPI CLI fits naturally into automated processes, CI/CD pipelines, or any task that benefits from quick, reliable file handling. By specifying parameters directly in your commands, you can tailor conversions to your exact requirements, from controlling resolution and page ranges to adjusting image quality.

File Converter Suite

High-performance and unbeatable accuracy document converter suite with support for over 500+ conversion.

Document Builder using CLI

Generate dynamic DOCX and PDF documents like invoices, contracts, reports, on the fly.

Document Management tools

Protect, redact, compare, watermark, flatten, compress and modify your documents using ConvertAPI CLI.

Security and Decryption

Protect and unprotect PDFs, MS Office Powerpoint and MS Office Word documents.

AI Data Extractor

Built to scale with your business, whether you're handling a few conversions or thousands.

Archiving & Optimization

Reduce file sizes without losing quality. Archive converters are designed to handle over 100 different file formats.

Take a look at CLI code samples

View on GitHub

Configure it online - we will generate the CLI code for you!

Configure your file conversion directly online using our intuitive interface. Select the desired parameters and see the results in real-time. Once you're satisfied, we’ll automatically generate the CLI code for you, making integration into your project effortless. No need to start from scratch—just copy the code and implement it seamlessly into your CLI application!

Get started now

File conversion examples using CLI

The ConvertAPI CLI is a command-line interface that leverages ConvertAPI’s comprehensive document conversion and management functionality. It supports a wide range of file formats—such as PDFs, Office documents (DOCX, XLSX, PPTX), images (JPG, PNG, TIFF), and more—enabling you to transform, split, merge, and secure documents right in your terminal or shell environment. By issuing commands with relevant parameters, you control the exact nature of each operation, from specifying page ranges to adjusting resolution and quality.

Key Highlights

  • Broad Format Compatibility: Convert PDFs to Word, turn multiple images into a single PDF, or optimize large presentations—using a single command-line interface.
  • Customizable Operations: Specify parameters such as page ranges, resolution, color modes, or image compression to tailor the resulting file precisely to your needs.
  • Script-Friendly Workflow: Integrate the CLI commands into shell scripts, makefiles, or scheduled tasks (like cron jobs) for efficient, repeatable document transformations.
  • Lightweight Setup: No large dependencies or complicated code structures—once the CLI is installed and configured with your API secret, you can start converting right away.

Installation and Configuration

  1. Download or Install the CLI:

    Check if there is a precompiled release for your operating system, or follow instructions to compile from source if needed.

  2. Get API Credentials:

    Please sign up for free to get your authentication token. After the sign-up process, you will get your secret on your account dashboard. The secret will be used in every CLI utility run.

Basic Usage Examples

Converting a File on Windows

convertapi-cli.exe <api-token> <output-directory> <input-files...> [from-format] [to-format] [key1=value1 key2=value2 ...]

Convert a single PDF to DOCX

convertapi-cli.exe YOUR_API_TOKEN output.docx input.pdf

Here, output.docx specifies the output name and indicates converting to DOCX format, and input.pdf specifies the source file.

Merge multiple PDF files into one

convertapi-cli.exe YOUR_API_TOKEN merged_output.pdf file1.pdf file2.pdf file3.pdf pdf merge

Protect a PDF with a password

convertapi-cli.exe YOUR_API_TOKEN protected_output.pdf input.pdf pdf protect UserPassword=1234 OwnerPassword=abcd FileName=protected

Add a watermark to a PDF

convertapi-cli.exe YOUR_API_TOKEN watermarked_output.pdf input.pdf pdf watermark Text=Confidential FileName=watermark

Conclusion

The ConvertAPI CLI provides a versatile and scriptable way to handle document transformations, from merging PDFs to enhancing images or safeguarding confidential content. It’s a one-stop command-line utility that minimizes overhead and simplifies automation, all while supporting an extensive range of formats and parameters.

For more details, updates, and deeper usage examples, explore the official ConvertAPI CLI GitHub repository.

Data security is our top priority

We ensure that all document processing is handled securely in the cloud, adhering to industry-leading standards like ISO 27001, GDPR, and HIPAA. To enhance security even further, we can ensure that no files or data are stored on our servers and never leave your country.

Learn more about security

Frequently asked questions

What does the ConvertAPI CLI do?

It provides a command-line interface to ConvertAPI’s document processing capabilities. You can convert, merge, and manipulate various file types (like PDFs, Office formats, and images) without writing extra code—simply by running commands from your terminal or in scripts.

How do I install it?

You can download the latest release from the official ConvertAPI CLI GitHub repository. Depending on your OS, you may need to place the executable in your system’s PATH or compile from source if prebuilt binaries aren’t available for your platform.

What file formats are supported?

The CLI supports a broad range—PDFs, Office documents (Word, Excel, PowerPoint), images (PNG, JPG, TIFF), text files, and more. The exact formats and tools as well as their specific parameters can be found in the API tool’s section.

Is there a cost to using the CLI?

The CLI itself is free to download, but it requires valid ConvertAPI credentials. Usage will follow your ConvertAPI plan or subscription limits. When your free trial ends, you will need to purchase a paid plan.

Where can I find more examples or advanced usage?

The ConvertAPI CLI repository offers additional instructions, command references, and sample scenarios. Reviewing the README or any included docs is a great way to discover advanced features and best practices.

Try our CLI library for free!