Stream Editor

Run a safe ed/sed-style command script over pasted text locally. Substitute, delete, print, insert, append, change, branch, and address by line number or regex without shell access.

Try:
Edited text

Run sed-style edits without a shell

Stream Editor applies a small sed/ed-style command script to pasted text entirely in the browser. It uses sed's familiar cycle model: each input line becomes the pattern space, matching commands run in order, and the line is printed automatically unless Quiet mode is enabled.

Common scripts work as expected:

Filesystem and shell sed commands are deliberately unavailable in the sandbox. Commands such as reading a file, writing a file, or executing a shell command return a clear error instead of reaching outside the pasted text.

Worked example

Input:

foo

keep foo
drop this

Script:

s/foo/bar/g
/drop/d
/^[[:space:]]*$/d

Output:

bar
keep bar

The first command replaces foo, the second deletes any line containing drop, and the third removes blank lines.

Limits and edge cases

FAQ

Is this a full GNU sed clone?

No. It implements the common stream-editing core for pasted text: addresses, ranges, substitutions, delete, print, insert/append/change, transliteration, hold space, labels and branches. Commands that require a filesystem or shell are blocked because this tool runs in a sandboxed browser/runtime model.

When should I turn on Quiet mode?

Use Quiet mode for sed -n style extraction. With quiet off, every line that survives the script is printed automatically. With quiet on, output appears only when the script uses commands such as p, P, =, or l.

What is the difference between basic and extended regex?

Basic mode matches traditional sed regular expressions where grouping and alternation are escaped, such as \(foo\|bar\). Extended mode matches sed -E style patterns like (foo|bar) and ID-([0-9]+).

Can it edit files directly?

No. Paste text in and copy or download the result. Direct file reads/writes and shell execution are intentionally unavailable so the script cannot access anything outside the text you supplied.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool stream-editor "foo

keep this line
drop this line"

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/stream-editor/?text=foo%0A%0Akeep%20this%20line%0Adrop%20this%20line&script=s%2Ffoo%2Fbar%2Fg%0A%2Fdrop%2Fd&quiet=true&ignore_case=true&whole_buffer=true&regex_flavor=basic&line_ending=lf&max_output_lines=100000

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.