Tabs ↔ Spaces Converter
Convert tabs to spaces or spaces to tabs. Set the tab size. Processed in the browser.
How to use?
Pick the conversion direction, set how many spaces stand for one tab, then paste your text. The swap happens in real time. It's useful when code comes from different editors and the indentation needs to line up.
Convert tabs to spaces (and back)
The old tabs-versus-spaces quarrel has a practical side. When the two show up mixed together, a code's indentation breaks and a text's alignment falls apart. Here you convert tabs into spaces, or spaces into tabs, and standardise the document in one go.
Set how many spaces a tab is worth and the swap happens across the entire content. It's the kind of thing that fixes an indentation that's off the project's style, repairs a file with mixed spacing or prepares text for a system that accepts only one of the formats.
Nothing leaves the browser during the process. Paste the text, pick which way the conversion goes and copy the standardised version right after.
Related Tools
Text to HTML Entities
Encode special characters as HTML entities (<, >, &) or decode HTML entities back to plain text.
Remove Extra Spaces
Remove double spaces, tabs and leading/trailing spaces from each line. Clean text copied from PDFs or web pages.
Trim Lines
Remove leading and trailing spaces and tabs from each line of text. Useful for cleaning code or copied data.