Home › Text Tools › Add Line Numbers

Add Line Numbers

Paste any text to number every line, with your own start number, step, zero padding and separator. Switch to remove mode to strip existing line numbers instead.

Last updated:

Advertisement

How to use the Add Line Numbers

  1. Paste your text into the Input text box. Each line gets its own number.
  2. Set the start number and step, for example start at 10 with a step of 10 for 10, 20, 30.
  3. Choose padding and a separator such as zeros and a period for 01. 02. 03.
  4. Tick Skip blank lines if empty lines should stay unnumbered.
  5. Press Add line numbers, then copy or download the result. Use Remove numbers mode to strip numbers from a list.

Line numbering examples

SettingsResult for three linesGood for
Start 1, step 1, period1. Apples · 2. Pears · 3. PlumsNumbered lists, instructions
Start 1, zeros, bracket01) … 02) … 03) (with 10+ lines)Aligned lists that sort as text
Start 10, step 10, space10 … 20 … 30BASIC-style code, leaving gaps to insert lines
Start 0, step 1, colon0:… 1:… 2:…Zero-based indexes for programmers
Start 5, step −1, tab5 → 4 → 3Countdowns and ranked lists

How the numbering is calculated

Line k (counting numbered lines from 0) gets the number start + k × step. With 12 lines, start 1 and step 1 the last number is 12, so zero padding uses two digits: 01, 02 … 12. With start 8 and step 2 the numbers are 8, 10, 12 …, and padding is based on the widest number in the list.

When Skip blank lines is on, empty lines (including lines that contain only spaces) do not use up a number, so the list stays continuous: a blank line between steps 3 and 4 stays blank and the next line is still 4.

Common uses

  • Number the lines of code, logs or a poem before sharing them so others can refer to “line 14”.
  • Turn a plain list into a numbered list for an email, document or forum post that does not support list formatting.
  • Add a tab-separated index column before pasting rows into a spreadsheet.
  • Strip old numbering from copied lists so they can be re-sorted and renumbered.

Frequently asked questions

How do I add line numbers to text?

Paste the text into the input box. Every line is numbered straight away using your start number, step and separator, and the numbered text appears in the Result box ready to copy or download.

Can I start numbering from a number other than 1?

Yes. Type any whole number in Start at, including 0 or a negative number, and choose a step such as 2, 5 or 10. A negative step counts down.

What does zero padding do?

It adds leading zeros so every number has the same width, for example 01 to 12 or 001 to 150. This keeps lists aligned and makes them sort correctly as text.

How are blank lines handled?

By default blank lines are numbered like any other line. Tick Skip blank lines to leave them empty and unnumbered; the counter continues on the next line with text.

How do I remove line numbers from text?

Switch to Remove numbers. The tool strips a number at the start of each line along with a following separator such as a period, bracket, colon, dash or tab, and keeps the rest of the line.

Can I use a tab between the number and the text?

Yes. Choose Tab as the separator. This is handy for pasting into a spreadsheet, where the numbers and text land in separate columns.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Sort Lines AlphabeticallySort a list A-Z, Z-A, numerically, naturally or by length, or shuffle it.Remove Line BreaksStrip line breaks and extra spaces, keep paragraphs if you want.Text RepeaterRepeat any text or emoji up to 100,000 times with custom separators.Word CounterCount words and characters and clean up text.JSON to Markdown TableTurn a JSON array of objects into a GitHub Markdown table with column picker and alignment.JSONL to CSV ConverterConvert JSON Lines / NDJSON to CSV with flattened columns; streams large files locally.JSONL to JSON ConverterConvert JSON Lines / NDJSON to a JSON array and back, with line-level error reports.Remove Numbers from TextStrip all numbers and digits from text, keep MP3-style words or ordinals, and tidy the spaces.Online Word ProcessorFree browser word processor with headings, lists, tables and images. Autosaves; export DOCX or PDF.Case ConverterConvert text to UPPERCASE, lowercase, Title Case, camelCase and more.MLA Format GeneratorBuild an MLA 9 heading, title page layout and Works Cited entries.Lorem Ipsum GeneratorGenerate placeholder text as paragraphs, words or lists, with HTML.Find and Replace TextFind and replace words or regex patterns in any text, with match highlighting and undo.Add Prefix and Suffix to LinesAdd text to the start and end of every line: quotes, commas, bullets or SQL lists.Comma SeparatorTurn a column of lines into a comma separated list and back, with any delimiter.Text to Handwriting ConverterTurn typed text into realistic handwriting on notebook paper and save it as PNG or PDF.Japanese Kana ConverterConvert romaji to hiragana or katakana, kana to romaji, and hiragana to katakana instantly.Pinyin Tone ConverterTurn pinyin tone numbers (ni3 hao3) into tone marks (nǐ hǎo), or tone marks back into numbers.Remove Duplicate LinesDelete duplicate lines from any list, ignoring case or spaces, keep first or last, and sort.Remove Extra SpacesClean up double spaces, tabs, blank lines, non-breaking and invisible spaces in one click.Random Word GeneratorGenerate random English words by type, length, first letter and syllables, then copy them.List RandomizerShuffle a list into random order, pick random items or split it into fair teams.Email ExtractorPull every unique email address out of text or files, sort, filter by domain and export CSV.URL ExtractorExtract every link from text or HTML, remove duplicates, filter by domain or protocol.Strip HTML TagsRemove HTML tags and get clean plain text with line breaks and decoded entities.Online NotepadPrivate notepad that autosaves notes in your browser, with find, word count and .txt download.Remove PunctuationStrip all or only selected punctuation from text, with smart options for apostrophes and numbers.Text SplitterSplit long text into chunks by characters, words, lines or a delimiter, with numbering and copy.Remove AccentsStrip accents and diacritics from text (é→e, ñ→n, ß→ss, ø→o) instantly, live as you type.Sort NumbersPull numbers out of any text and sort them ascending or descending, with sum, average and median.Thread SplitterSplit long text into numbered X, Threads, Bluesky or Mastodon posts at sentence boundaries.Duplicate Word FinderFind repeated words in your text: doubled words like "the the" and overused words, highlighted.Alternating Caps GeneratorTurn text into aLtErNaTiNg caps, random caps or alternating words, then copy it.Random Paragraph GeneratorGenerate readable random English paragraphs by topic and length for writing and design.Random Sentence GeneratorGenerate random grammatical sentences: simple, compound, complex and questions.Markdown to Plain TextStrip Markdown syntax and keep clean plain text with lists, line breaks and link URLs.SRT to TextTurn SRT or VTT subtitles into a clean transcript with paragraphs, with or without timestamps.Transcript CleanerRemove timestamps, speaker labels and filler words like um and uh, and fix broken line breaks.Letter to Number ConverterConvert letters to alphabet numbers (A=1 to Z=26) and back, with ASCII codes and letter sums.Markdown to Word ConverterConvert Markdown to a styled Word .docx file with headings, lists, tables, code and links.Plural GeneratorConvert English nouns from singular to plural and back, irregulars included, one word per line.Remove Empty LinesDelete blank and whitespace-only lines, or collapse gaps to one, with before/after line counts.Remove Text FormattingPaste rich text from Word, Google Docs or the web and get clean plain text instantly.Smart Quotes ConverterConvert curly quotes, dashes and ellipses to straight ASCII, or straight quotes to typographic ones.Text to HTML ConverterTurn plain text into clean HTML: paragraphs, line breaks, links, lists and escaped entities.Text to Word ConverterTurn text or a .txt file into a Word .docx with your font, margins and page size.WhatsApp Text FormatterFormat WhatsApp messages with bold, italic, strikethrough, monospace, lists and quotes, then copy.Word CombinerBlend two or more words into portmanteaus, compound and clipped names for brands and wordplay.Word to HTML ConverterConvert Word .docx files or pasted rich text into clean, semantic HTML with live preview.Word Wrap ToolWrap text at any column width with hard line breaks, indents and prefixes, or unwrap it again.Daily Affirmation GeneratorGet random positive affirmations by theme; save favorites, copy them or make an image card.Business Plan GeneratorFill in a guided form and get a formatted business plan with financial tables, as Word or PDF.Keyword Match Type ConverterTurn a keyword list into broad, "phrase", [exact] and negative match types for PPC ads.Discord Text FormatterFormat Discord messages with bold, spoilers, headers, quotes, lists and code blocks, with live preview.DNA Reverse ComplementGet the reverse, complement or reverse complement of DNA/RNA, FASTA and IUPAC codes supported.Filter Lines Containing TextKeep or remove lines that contain words or match a pattern, with match counts and regex.Focus Reading ConverterBold the first letters of every word for faster, focused reading. Copy as rich text or HTML.Memo GeneratorWrite a business memo in standard To/From/Date/Subject format, then print, copy or save as .docx.PDF Text CleanerFix text copied from a PDF: join broken lines, undo hyphen splits, drop page numbers and headers.Pros and Cons List MakerWeigh a decision with a weighted pros and cons list, a score, a verdict and easy export.Return Policy GeneratorCreate a return and refund policy for your store as text or HTML, with a refund example.Screenplay FormatterType a script in plain text (Fountain) and get a properly formatted screenplay, page count and PDF.Word ChangerSwap words for synonyms in your text, then click any word to cycle through alternatives.Words That End WithFind English words ending in any letters or suffix, filtered by length and sorted by score.Annotated Bibliography GeneratorBuild an APA or MLA annotated bibliography with hanging indents and download it as DOCX.EPUB to Text ConverterExtract plain text from EPUB e-books, pick chapters, count words and download a TXT file.Extract Dates from TextFind every date in text, in any common format, and convert them all to one format you choose.Extract Text Between DelimitersPull out every piece of text between brackets, quotes, HTML tags or your own start and end markers.
See all 96 Text Cleaning & Formatting →