Add Line Numbers to Text
cross-browser testing tools
World's simplest online line numbering tool for web developers and programmers. Just paste your text in the form below, press the Enumerate Lines button, and you'll get numbered lines. Press a button – enumerate text lines. No ads, nonsense, or garbage.
Announcement: We just launched Online Text Tools – a collection of browser-based text processing utilities. Check it out!
Using a Line Number Counter in Cross-browser Testing
A line number counter can be useful if you're doing cross-browser testing. For example, if your a webapp counts how many lines a user has entered in a form and it checks the format of each line, then if the user makes a mistake, it may be a good idea to tell them which line the mistake happened. Without line numbers added to input data, the user would have to count the lines himself or herself to find the line with an error but if you enumerate lines for the user and add line numbers to the input text, then the user can quickly find the line in question. This program can help you write unit tests for this use case. The input data of the test would be text without line numbers and the output data would be the same text but with line numbers added before each line. Additionally, this utility can be used to find out how many lines are in your text. If you paste the text you're working with in the input field and quickly scroll to the bottom of your text, you'll find the last line of text and its line number.
Looking for more web developer tools? Try these!
Pro tip: You can use ?input=text query argument to pass text to tools.