DevTools Surf logoDevTools Surf
AI / Modern DevAnimation / CSSAPI / Config
Sign in
DevTools Surf logoDevTools Surf
AI / Modern DevAnimation / CSSAPI / Config
Sign in
HomeDeveloper UtilitiesSed Simulator

About Sed Simulator

Sed Simulator preview - Developer Utilities tool

Interactive sed command simulator. Part of the DevTools Surf developer suite. Browse more tools in the Developer Utilities collection.

Use Cases

  • Replace all occurrences of a string across a file in a single command.
  • Delete lines matching a pattern from a log file.
  • Insert or append text at specific line numbers in a file.
  • Chain multiple substitutions in a single sed command for batch text transformation.

Tips

  • Use -E flag (extended regex) for +, ?, and () without escaping — basic regex requires \+, \?, and \(\) which is easy to confuse.
  • Test destructive substitutions with p flag first: sed -n 's/old/new/p' shows what would change without modifying anything.
  • Use \n in replacement strings to insert literal newlines on GNU sed (macOS sed requires a different escape syntax).

Fun Facts

  • sed was created by Lee McMahon at Bell Labs in 1973, making it one of the oldest Unix utilities still in daily use. The name stands for 'stream editor.'
  • sed's s command (substitute) is the most used sed feature by far — many sed users have never needed any other command despite sed having a complete set of programming constructs.
  • POSIX standardized sed in 1992. GNU sed added extensions (like -E for extended regex and in-place editing with -i) that are not POSIX-compliant but became de facto standards.

FAQ

How do I do in-place file editing with sed?
Use sed -i 's/old/new/g' file.txt on GNU/Linux. On macOS (BSD sed), use sed -i '' 's/old/new/g' file.txt — the empty string after -i is required. Always backup before -i on critical files.
What's the difference between sed s/x/y/ and s/x/y/g?
Without /g, the substitution applies only to the first match on each line. With /g (global), it applies to every match on each line. This is the most common sed mistake.

Related Developer Utilities Tools

Collection JSON → cURLGit Diff → HTMLRegex VisualizerMakefile ExplainerShell Script LinterGitHub Actions VisualizerHAR File ViewerAPI Response Mocker
New · Flagshipsimple REST client

REST Handler — Collections, env vars, history, cURL converter

Send requests, save collections (nested), swap environments, and convert between cURL / Collection JSON / REST Handler YAML.

Open

Popular tools

The most-used tools on DevToolsSurf, one click away.

Encoding & crypto

  • Base64 Encode
  • Base64 Decode
  • URL Encoder
  • URL Decoder
  • Hash Generator
  • JWT Decoder
  • JWT Encoder
  • UUID Generator
  • ULID Generator
  • Password Generator
  • Bcrypt Hash Tester

Converters

  • CSV to JSON
  • JSON to CSV
  • XML to JSON
  • JSON to XML
  • HTML → Markdown
  • HTML → React JSX
  • cURL to Code
  • Collection JSON → cURL
  • Swagger to Collection JSON
  • JSON → Go Struct
  • JSON → TypeScript Types

JSON & YAML

  • JSON Formatter
  • JSON Validator
  • JSON Viewer
  • JSON Minifier
  • JSON Diff
  • JSONPath Tester
  • YAML Formatter
  • YAML to JSON
  • JSON to YAML

Text & regex

  • Regex Tester
  • Text Diff
  • Case Converter
  • Word Counter
  • Markdown Preview
  • Slug Generator
  • Lorem Ipsum Generator
  • Markdown → PDF

CSS & color

  • CSS Beautifier
  • Minify CSS
  • Color Converter
  • Gradient Generator
  • Contrast Checker
  • Color Palette Generator
  • Flexbox Playground
  • Tailwind → CSS

Generators

  • QR Code Generator
  • Mock Data Generator
  • Favicon Generator
  • .gitignore Builder
  • README.md Generator
  • Dockerfile Generator
  • Sitemap Generator

API & networking

  • REST Handler
  • HTTP Header Analyzer
  • IP Address Lookup
  • CIDR Calculator
  • User-Agent Parser
  • HTTP Status Reference
  • OpenAPI Viewer

Date & time

  • Timestamp Converter
  • Timezone Converter
  • Cron Expression Parser
  • Duration Calculator
  • Age Calculator
  • Date Format Converter

Images

  • Image Converter
  • Image Resizer (Batch)
  • SVG Optimizer
  • Base64 ↔ Image
  • WebP ↔ AVIF Converter
  • Image Compressor

PDF tools

  • PDF Merger
  • PDF Splitter
  • PDF Compressor
  • Markdown → PDF
  • EPUB → PDF
  • MOBI / AZW → PDF
  • DOCX → PDF
  • HTML → PDF

Resources

  • Community feed
  • Themes marketplace
  • Pricing & credits
  • Privacy policy
  • Terms of service
  • Sitemap
  • robots.txt

Your account

  • Sign in
  • Dashboard
  • Run history
  • My profile
  • Settings
DevTools Surf logo
DevTools Surf912+ tools

Fast · privacy-first · client-side · © 2026

Home·Feed·ThemesPricing·Sign inPrivacy·Sitemap Feedback