---
name: "ledger2beancount"
section: "1"
platform: "linux"
package: "ledger2beancount"
version: "2.7-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/ledger2beancount"
---

# ledger2beancount(1)

ledger to beancount converter

## NAME

ledger2beancount - ledger to beancount converter

## SYNOPSIS

**ledger2beancount** \[options\] *input.ledger* \> *output.beancount*

**cat** *input.ledger* \| **ledger2beancount** \[options\] \> *output.beancount*

## DESCRIPTION

**ledger2beancount** is a script to automatically convert [**ledger**(1)](/ledger/1.md)-based textual ledgers to **beancount** files.

Conversion is based on (concrete) syntax, so that information that is not meaningful for accounting reasons but still valuable (e.g., comments, formatting, etc.) can be preserved.

## OPTIONS

- **-c, --config**

  Specify a configuration file.  The options of the configuration file are described in [**ledger2beancount**(5)](/ledger2beancount/5.md) and the **ledger2beancount** manual.

- **-h, --help**

  Show help message and quit.

- **-V, --version**

  Show version and quit.

## USAGE

**ledger2beancount** accepts input from *stdin* or from a file and will write the converted data to *stdout*.  You can run **ledger2beancount** like this on the example provided:

**ledger2beancount** *examples/simple.ledger* \> *simple.beancount*

After you convert your [**ledger**(1)](/ledger/1.md) file, you should validate the generated beancount file with [**bean-check**(1)](/bean-check/1.md) and fix all errors:

**bean-check** *simple.beancount*

You should also inspect the generated **beancount** file to see if it looks correct to you.  Please note that **ledger2beancount** puts notes at the beginning of the generated **beancount** file if it encounters problems with the conversion.

## FILES

*$PWD/.ledger2beancount.yaml* or *$PWD/ledger2beancount.yaml*

The configuration file for the current directory.

*$XDG\_CONFIG\_HOME/ledger2beancount/config.yaml* (usually *$HOME/.config/ledger2beancount/config.yaml*)

The default configuration file.

## BUGS

If you find any bugs in **ledger2beancount** or believe the conversion from **ledger** to **beancount** could be improved, please open an issue on GitHub:

https://github.com/beancount/ledger2beancount/issues

Please include a small test case so we can reproduce the problem.

## AUTHORS

Stefano Zacchiroli and Martin Michlmayr

## SEE ALSO

[**ledger2beancount**(5)](/ledger2beancount/5.md), [**ledger**(1)](/ledger/1.md), [**bean-check**(1)](/bean-check/1.md)

The full documentation for **ledger2beancount** can be found in its manual.
