sed Simulator
Simulate sed substitutions, line deletion, and matching-line output on pasted ASCII text using a bounded browser-side regex subset.
Runs locally in your browser. Sample text is not uploaded or saved. This is a bounded sed simulation, not a shell or an in-place file editor.
ASCII/C-locale subset: literals, dot, anchors, bracket classes (including POSIX classes), groups, alternation, and greedy repetition. Groups do not expose captures: replacement backreferences such as \1, case conversions, arbitrary scripts, addresses, and multiline commands are not supported. Replacement supports &, \&, \\, \n, and \t.
Limits: 50,000 input characters, 5,000 lines, 5,000 characters per line, 256 pattern characters, finite repetition bounds up to 50, and bounded execution/output. This is not the full GNU sed implementation.
sed simulation result
Choose an operation and simulate to see the output.
An empty output can be a successful result, such as deleting every line. Original input stays unchanged. Test native commands on a disposable copy before editing real files.
Learn
About this tool
Simulate a bounded subset of sed on pasted ASCII text. Choose substitution, deleting matching lines, or printing matching lines. Substitutions support first or global replacement, case-insensitive matching, whole-match insertion with &, and printing only lines with a substitution. This tool does not execute arbitrary sed scripts or edit files.Questions
- Is this GNU sed running in the browser?
- No. A local bounded regex engine implements the documented ASCII/C-locale subset with leftmost-longest whole-match selection. It does not implement full sed, capture backreferences, case-conversion escapes, hold space, multiline commands, or arbitrary script execution.
- Can I use captured groups in the replacement?
- Grouping can organize a pattern, but replacement backreferences such as \1 are not implemented. Use & for the complete match. Unsupported replacement escapes are rejected rather than guessed.
- Does this overwrite my original text or save it?
- No. The output is separate from the original sample. Processing happens locally without tool input storage or upload. Clear sample removes the sample and result while leaving the selected options unchanged.
- What are the simulation limits?
- Up to 50,000 ASCII input characters, 5,000 lines, 5,000 characters per line, 256 pattern characters, and 1,000 replacement characters. Finite repetition bounds are limited to 50, compiled patterns to 500 states, and output to 200,000 characters. A bounded work budget rejects expensive simulations.