---
title: "Tabs to Spaces Converter & Re-indenter | TabMender"
description: "Convert tabs to spaces or spaces to tabs, change indent width, detect mixed indentation and see every space, tab and line end. Free, runs in your browser."
url: https://tabmender.me/
---

01Tabs ⇄ spaces

# Convert tabs to spaces and re-indent code

Paste code or drop files. TabMender measures the indentation, converts tabs and spaces either way, changes the indent width and shows every space · tab → and line end ↵ it touched. Nothing leaves your browser.

## Detected

order.js

Indent steps between lines (spaces)

1. +4 3
2. +18 1

02More whitespace tools

## Every other way whitespace breaks things

- [Invisible character detector](https://tabmender.me/invisible-character-detector/): Zero-width spaces, no-break spaces, BOMs, bidi controls (Trojan Source), tag characters and Cyrillic look-alikes inside Latin words.
- [Line ending converter](https://tabmender.me/line-ending-converter/): Count CRLF, LF and CR in each file, convert them all to one style and fix the final newline. Files in, files out.
- [Trailing whitespace remover](https://tabmender.me/trailing-whitespace-remover/): Strip spaces and tabs at line ends, blank lines at the end of a file and runs of empty lines, keeping Markdown line breaks.
- [YAML tab fixer](https://tabmender.me/yaml-tab-fixer/): Fix “found character that cannot start any token”: replace tabs with spaces, keep the nesting and check the result parses.
- [Makefile tab checker](https://tabmender.me/makefile-tab-checker/): Find the space-indented recipe lines behind “missing separator” and turn them into tabs, without touching define blocks.
- [EditorConfig generator](https://tabmender.me/editorconfig-generator/): Build an .editorconfig from language presets, then check which settings apply to any path in your project.
- [Column aligner](https://tabmender.me/column-aligner/): Line up assignments, key–value pairs and Markdown tables on any delimiter, with CJK text and emoji counted at their real width.

03Recommended

## Two more tools for testing what you build

CleanTempMail

### Real inboxes for sign-up tests

Testing a registration or password-reset flow? [CleanTempMail](https://cleantempmail.com/) gives you a disposable inbox instantly, with no sign-up, on hundreds of domains. For automated tests, its [Temp Mail API](https://cleantempmail.com/api) creates addresses and reads verification emails from your test code; it is paid once per request quota, with no subscription.

[See the Temp Mail API](https://cleantempmail.com/api)

WebTraceCheck

### Check a site in browsers you don’t have

[WebTraceCheck](https://webtracecheck.com/) opens Brave, Chrome, Edge, Firefox or Chromium in a disposable cloud browser on an isolated Linux desktop that is deleted after each session. There is free daily time and nothing to install, which makes it a quick way to see how your page renders in another engine.

[Open a cloud browser](https://webtracecheck.com/)

04Questions

## Tabs, spaces and indentation

**Does converting tabs to spaces change how my code runs?**

For most languages, no: indentation is whitespace the compiler ignores. It matters in Python, YAML, Makefiles and a few others. Python 3 refuses files that mix tabs and spaces inconsistently, so converting a mixed file to one style is exactly the fix it needs.

**How does it work out the indent width?**

It measures how far the indentation grows from one line to the next and picks the most common step, so a 4-space file shows mostly +4 steps. Lines inside block comments are skipped, and lines aligned under a bracket count as alignment rather than a new level. The confidence is the share of steps that agree.

**What does “every tab, mid-line too” do?**

Tabs after the indentation, such as tabs that line up comments or values, are replaced with as many spaces as it takes to reach the next tab stop. A fixed run of spaces would break the alignment; expanding to the tab stop keeps the columns where they were.

**What happens to lines that line up with a bracket?**

A line indented past its parent by an amount that is not a whole level, like an argument lined up under an opening parenthesis, keeps the same offset from the line above it. When you change the indent width, it moves with its parent and stays aligned.

**Are line endings changed?**

Only if you choose a style under Line endings. Otherwise every line keeps its own ending, CRLF, LF or CR, and files are saved back in the encoding they came in, including a byte order mark if they had one.

**Is my code uploaded anywhere?**

No. Files are read and converted in your browser, in a background worker so large files do not freeze the page. Nothing you paste or drop is sent to a server.
