Skip to main content
Free browser tool

Ledger to Beancount converter

Paste a Ledger or hledger journal and get Beancount you can run. The two formats are close cousins, which is what makes hand-conversion risky — so anything that can't be mapped is reported with its line number rather than quietly dropped.

Everything runs in your browser. Your journal is never uploaded anywhere.

Beancount output

Your converted journal will appear here as soon as you paste one.

Questions about this tool

Is my journal uploaded anywhere?

No. The conversion runs entirely in your browser using JavaScript on this page — your journal is never sent to beancount.io or anyone else, and nothing is stored. You can confirm it by disconnecting from the internet and converting anyway: it still works.

What actually differs between Ledger and Beancount?

Three things bite in practice. Account names: Ledger allows spaces and lowercase, Beancount requires one of five roots followed by capitalized, space-free segments — so 'expenses:home:rent' becomes 'Expenses:Home:Rent'. Amounts: Beancount always writes the number first and the commodity after, so '$84.23' becomes '84.23 USD'. And accounts must be opened before use in Beancount, which Ledger never required. This tool handles all three and tells you every account it renamed.

What can't be converted?

Virtual postings — the ones in parentheses or brackets — have no Beancount equivalent, because Beancount requires every transaction to balance. Automated transactions ('=') and periodic transactions ('~') likewise have no direct equivalent. Included files must be inlined first, since the converter only sees what you paste. Each of these is commented out in the output and listed with its line number, so nothing disappears silently.

How do I check the result is right?

Run bean-check against the output — 'uvx --from beancount bean-check main.bean' works without installing anything permanently. It will catch unbalanced transactions, unopened accounts and syntax problems. Then compare a balance report against the same report from Ledger: if the totals agree, the conversion carried your history across intact.

Converted the file. Now keep it forever.

Beancount.io hosts your plain-text ledger with bank sync, reporting and mobile apps — and the files stay yours to download at any time.