Avatar

SIE - Sweden's gift to plaintext accounting

2 min read
by

Every year when I’m doing the annual filings for my Swedish companies, I’m reminded of how grateful I am for the SIE file format.

In the early 1990s, the market for Swedish tax-declaration software exploded. Each new tax program had to build custom software to import data from every other accounting program on the market, which of course led to an ever-growing pile of glue code to reconcile the quirks of each program’s custom format.

The fix was SIE: a simple plaintext format that any bookkeeping program could export and any downstream program could consume. It helped is that Sweden already had a standardised chart of accounts (BAS-kontoplanen). Without that, the format wouldn’t have been possible.

Today, virtually all accounting software in Sweden supports it, which makes moving your bookkeeping data around trivial. This is a dream for plaintext accounting enthusiasts like me — people who hate the idea of their financial data being trapped in a SaaS, and love to roll their own scripts.

Over the years I’ve handcrafted a bunch of small SIE tools for my own filings. With AI making it a lot easier to build personal software, I decided to take the time to open-source a couple of them:

  • SIE LSP: A language server written in Rust that understands the SIE grammar. It parses your file, validates it against the v4B spec, and surfaces formatting errors. Ships as both a standalone CLI (sie) for scripting and a language server (sie-lsp) for editor integrations.

  • sie.nvim: A minimal Neovim plugin that wires the LSP into .se / .si / .sie buffers, giving you real-time diagnostics and syntax highlighting for SIE files:

If you want to build automated workflows around your Swedish bookkeeping, these should be a decent start.

I now live in the UK, where I keep my personal books in Beancount — a lovely plaintext format inspired by Ledger. But without a standard like SIE, every bank and tool speaks its own dialect, and half your time goes to writing import scripts. I miss SIE dearly.

Other countries: take note. 🇸🇪