UnQTools
Developer Runs in your browser

awk Command Builder & Tester

Build and test awk one-liners in the browser. A pure-JavaScript awk interpreter (no WASM, no network) runs BEGIN/END blocks, pattern { action } rules, field separators (-F / FS), -v variables, $0/$1/$N, NR/NF, OFS, print/printf, if/while/for, length/tolower/toupper/substr/split, regex patterns, arithmetic, comparisons, and string concatenation. Visual builder (pick columns, add a condition, choose an aggregation → generates the program), per-option plain-English explanation, reverse program explainer, sample-data library, recipe presets, GNU vs POSIX toggle, copy-ready `awk -F',' '{print $1,$3}' file` command, history (max 20), shareable URL. 100% client-side.

100% Private Works Offline Instant

About awk Command Builder & Tester

Build and test awk one-liners in the browser. A pure-JavaScript awk interpreter (no WASM, no network) runs BEGIN/END blocks, pattern { action } rules, field separators (-F / FS), -v variables, $0/$1/$N, NR/NF, OFS, print/printf, if/while/for, length/tolower/toupper/substr/split, regex patterns, arithmetic, comparisons, and string concatenation. Visual builder (pick columns, add a condition, choose an aggregation → generates the program), per-option plain-English explanation, reverse program explainer, sample-data library, recipe presets, GNU vs POSIX toggle, copy-ready `awk -F',' '{print $1,$3}' file` command, history (max 20), shareable URL. 100% client-side. Everything runs locally in your browser — your data never leaves your device.

How to use

  1. Enter your input in the tool above.
  2. Adjust any options to your preference.
  3. Use the Copy or Download buttons to save the result.
  4. Everything happens locally — your data never leaves your browser.

FAQ

Is this a real awk engine?

It's a small pure-JavaScript awk interpreter built from scratch — no WASM, no network. It supports BEGIN/END blocks, pattern { action } rules, $0/$1/$N field access, NR/NF special variables, the -F field-separator flag, -v variable assignment, FS/OFS, print and printf, if/else, while, for, length/tolower/toupper/substr/split, arithmetic (+ - * / %), comparisons (== != < > <= >=), logical operators (&& || !), string concatenation, and /regex/ patterns. For features outside this subset (e.g. gawk-only extensions, associative arrays, functions, BEGINFILE/ENDFILE) use awk.js.org or gawk directly.

How does the visual builder work?

Pick the columns to print (comma-separated, e.g. 1,3), optionally add a condition (e.g. $2 > 100 or /pattern/), optionally choose an aggregation (sum, avg, min, max, count), choose a field separator, and the builder generates a valid awk program AND a copy-ready command `awk -F',' '{print $1,$3}' file`. Each option has a plain-English explanation showing what -F, -v, BEGIN, END, NR, NF, and OFS do in your specific program.

What does the reverse explainer do?

Paste any awk program (from a Stack Overflow answer or shell history) and the explainer annotates each token: $1, $2 → first/second field; NR → current record number; NF → field count; BEGIN{}/END{} → setup/teardown blocks; -F',' → comma field separator; -v var=val → variable pre-assignment; /pattern/ → regex match; print → output. Each annotation is plain English so non-experts can read the program.

How does field separator handling work?

Use -F',' (or FS="," in BEGIN) for CSV, -F' ' for TSV, -F':' for /etc/passwd. Default whitespace FS treats runs of spaces/tabs as a single separator and trims leading/trailing — matching awk CLI behavior. Multi-character literal separators (e.g. -F'::') are supported; regex separators (e.g. -F'[,:]' to split on either comma or colon) are also supported by the interpreter.

What extra features does this tool have versus awk.js.org?

(1) Pure-JS interpreter — instant load, works offline, no WASM. (2) Visual builder that generates valid awk for print columns, filter by pattern, sum/avg/min/max/count. (3) Per-option explanation in plain English. (4) Reverse explainer that annotates a pasted program. (5) Recipe library (10 common one-liners). (6) Sample data library (CSV, TSV, /etc/passwd, access log). (7) GNU vs POSIX toggle changes the example invocation comment. (8) Auto shell-quoting of the program (single quotes, with proper escaping). (9) Copy command + copy output. (10) localStorage history (max 20). (11) Shareable URL with embedded program + input. 100% client-side — your text never leaves the device.

Search tools and actions

Search across all 616 tools, categories, and quick actions.