Add/Remove Line Numbers
Add sequential line numbers to your text or remove existing line numbers instantly. Perfect for code snippets, scripts, and documentation.
Example
Before (without line numbers)
function hello() {
console.log("Hello, world!");
}
hello();After (with line numbers)
1. function hello() {
2. console.log("Hello, world!");
3. }
4. hello();About This Tool
The Line Numbers tool makes it easy to add or remove line numbers from any text. Add sequential line numbers with your choice of separator, or quickly strip existing line numbers from numbered text.
Perfect for code snippets, scripts, documentation, or any text that needs line numbering for reference. Customize the starting number and separator to match your preferred format.
Frequently Asked Questions
Related Tools
Remove Line Breaks
Remove line breaks from copied text
Replace Line Breaks
Replace line breaks with spaces or commas
Remove HTML Tags
Strip HTML tags and get plain text
Normalize Whitespace
Clean up extra spaces, tabs, and empty lines
Case Converter
Convert text to upper, lower, title, or sentence case
Remove Empty Lines
Remove or collapse empty lines from text
JSON Prettify
Format, beautify, and minify JSON
URL Encode/Decode
Encode text to URL-safe format or decode
Remove Duplicate Lines
Remove duplicate lines and deduplicate text
Word Counter
Count words, characters, sentences, and paragraphs
Sort Lines
Sort lines alphabetically, reverse, or randomly
Text to Slug
Convert text to URL-friendly slugs
Reverse Text
Reverse characters, words, or lines in text
Find & Replace
Search and replace text with regex support
Text Repeater
Repeat text multiple times with custom separator
Extract Emails
Extract all email addresses from text
Extract URLs
Extract all URLs and links from text