Skip to content
Test versionSearch

Developer tools

Leading tabs and spaces converter

Convert leading tabs to spaces or spaces to tabs with chosen tab stops, while line endings, inner text and Unicode characters stay unchanged.

How it worksFAQRelated tools

Content reviewed:

The example values can be changed. Press Calculate to update the result; you can download it as TXT or CSV and collect scenarios in this tab. Nothing is saved or sent automatically.

UTC and explicit date ordering; bounded leading-whitespace or host-only conversion. Deliberate downloads, no automatic saving or sending.

Decimal results are approximate. Inputs stay in this browser tab.

How it works

UTC instants, explicit Gregorian date ordering, declared leading tab stops and native URL host normalization. UTC and explicit date ordering; bounded leading-whitespace or host-only conversion. Deliberate downloads, no automatic saving or sending.

Worked example

With these example values the calculator gives the result below. You can change any value in the form above.

Inputs

Text, at most 2000 UTF16 units
first äß🚀 end
Tab width (2–8 columns)
4
Leading indentation output
Spaces

Result

Exact converted text JSON: part 1
" first\n äß🚀\n end"

Frequently asked questions

How do I convert only leading tabs and spaces?

Choose a tab width and mode. Only leading indentation is converted, while line endings, inner text and Unicode are retained.

What is the example setting?

The editable example uses width 4 and mode spaces.

Does inner text change?

No. Only leading indentation changes, and inner text stays as entered.

Can I download the result?

Yes, as a deliberate TXT download. There is no automatic saving or sending.

What file can I load?

An optional UTF-8 TXT file of 8 KiB and 2000 units.