Docomint

Leerzeichen zu Tabs

Wandelt führende Leerzeichen zurück in Tabulatorzeichen um, für einheitliche Code-Einrückung.

🔒 Processed on your device

What is a Leerzeichen zu Tabs?

Converts a file's leading indentation from spaces back to tabs, for codebases or style guides that require tab-based indentation — only leading whitespace on each line is touched, so spaces between words or mid-line are left alone.

How to use the Leerzeichen zu Tabs

  1. Paste space-indented text or code
  2. Set how many spaces equal one tab
  3. The converted result appears instantly, on your device

Example

A line indented with 8 leading spaces converts to 2 tab characters when the tab width is set to 4, collapsing the leading whitespace without touching spacing elsewhere on the line.

Frequently asked questions

Does this touch spaces in the middle of a line?

No — only leading indentation at the start of each line is converted to tabs. Spaces between words or code tokens are left exactly as they are.

Is my text uploaded anywhere?

No — Leerzeichen zu Tabs runs entirely in your browser using JavaScript/WebAssembly. Your text is never sent to a server.

What happens if the leading spaces aren't an exact multiple of the tab width?

The leftover spaces that don't make a full tab are kept as plain spaces after the converted tabs, so no whitespace is silently dropped.

Related tools