Free online tools to generate, calculate,
convert, format, encode, and play.
 

Sed One-Liner Generator

Select a common sed task, fill in the parameters, and get a ready-to-use one-liner with a live before/after preview.


Task


How It Works

This tool generates sed (stream editor) one-liners for common text processing tasks:

  • Select a task — choose from search-and-replace, line deletion, field extraction, and other common operations
  • Fill in parameters — provide the values specific to your task (patterns, line numbers, replacement text)
  • Copy the command — use the generated one-liner directly in your terminal
  • Preview the result — paste sample text to see before and after side by side

All processing is done locally in your browser — no data is sent to any server.

Sed Quick Reference
Syntax Meaning Example
s/old/new/ Replace first occurrence per line sed 's/foo/bar/'
s/old/new/g Replace all occurrences per line sed 's/foo/bar/g'
s/old/new/gi Replace all, case-insensitive sed 's/foo/bar/gI'
Nd Delete line N sed '3d'
/pat/d Delete lines matching pattern sed '/error/d'
-i Edit file in place sed -i 's/a/b/g' file
-n ... p Print only matching lines sed -n '5,10p' file
N,Md Delete line range N to M sed '2,5d'

Embed This Util

You can embed this util on your own site as a widget. Adding ?embed=1 to the URL loads a compact version with just the tool itself; no header, menu, or documentation. Paste this snippet into your HTML:


    

Copy snippet Adjust the height to taste.



Feedback

Help us improve this page by providing feedback, and include your name/email if you want us to reach back. Thank you in advance.


Share with