Prompt Optimizer — Analyze & Locally Rewrite LLM Prompts
Instant browser-only analysis: structure checks, redundancy findings, heuristic score, and token waste. Opt in to a local Qwen rewrite with honest on-device labeling — no API keys. Pair with the token counter, context window calculator, JSON to TOON, and text diff tools.
How analysis works
Layer 1 (default): rule-based structure checks, redundancy detection, a 0–100 heuristic score, and token waste using the same exact/estimate tiering as the token counter. Layer 2 (opt-in): after you confirm, WebLLM loads Qwen 1.5B in a Web Worker and rewrites your prompt using Layer 1 findings — labeled honestly as local-model quality.
Key features
- Instant heuristic analysis without download
- Token waste with honest exact/estimate badges
- API-messages per-role findings cards
- Opt-in local Qwen rewrite via WebLLM
- Consent + real download progress
- Rewrite pane with token delta — no auto-replace
Local AI rewrite
Requires WebGPU and a one-time model download (IndexedDB cache on repeat visits). The rewrite never auto-replaces your input — copy or apply manually. Not equivalent to GPT-4 or Claude.
Privacy
No server processing. No BYOK in v1. Prompt text is not sent to FastMinify or third-party inference APIs.
Limitations
The score is a checklist heuristic, not output-quality judgment. Redundancy detection catches exact/near-duplicate text, not paraphrased repetition. Local rewrite quality is bounded by the small on-device model. Maximum input is about 512 KiB of UTF-8 text.
Related LLM & text tools
Pair analysis with the LLM token counter, check fit with the context window calculator, compress tabular data via JSON to TOON, or compare rewrite versions in text diff.
Options that change the analysis or rewrite
FAQ
Analysis, rewrite, and privacy
Does this rewrite my prompt with AI?
Only if you explicitly opt in to Layer 2. Layer 1 never rewrites — it measures and suggests.
How accurate is the score?
It is checklist-based (six criteria, equal weighting), not a guarantee of model output quality. Non-English prompts may score differently.
Does it catch every redundancy?
No. v1 detects exact and near-duplicate text blocks, not paraphrased repetition.
What is the maximum input size?
About 512 KiB of UTF-8 text. Larger inputs show an error card and are not analyzed.
Is my prompt sent to OpenAI or Anthropic?
No. Analysis runs locally. The optional rewrite runs in a browser Web Worker after you confirm a model download.
What if WebGPU is unavailable?
Layer 1 remains fully usable. Layer 2 shows an honest message and does not download a model.
Will the rewrite replace my input?
Never automatically. You copy or apply the rewrite yourself.
AI & LLM
Token counting, pricing estimates, and context-window fit — 100% browser-local.
Explore other tool categories
Minify
Shrink code and assets for production — minify JavaScript, CSS, HTML, JSON and XML before gzip or CDN deploy.
Beautify
Make code readable with consistent indentation — beautify JavaScript, CSS, TypeScript, SCSS, LESS, Markdown, GraphQL, SQL, YAML and more in your browser.
Unminify
Expand minified or compressed code — unminify JavaScript, CSS, TypeScript, SCSS, LESS, SQL, YAML and other formats when debugging or reviewing.
Conversion
Transform data between JSON, YAML, XML and CSV locally — no server uploads.
CSS preprocessors
Compile SCSS or LESS to standard CSS in the browser — pair with beautify or minify for a full stylesheet workflow.
JSON Tools
Validate, format, diff and explore JSON payloads — complementary to minifiers and converters.
SVG Tools
Preview, optimize with SVGO, export Data URI, resize, beautify, convert to JSX and validate SVG — all in your browser.
DevOps & Infra
Terraform HCL format/validate/minify, Dockerfile format & lint, Docker Compose and .env validation.
CI/CD
GitHub Actions and GitLab CI — format YAML and check workflow/job structure in your browser.
Logs & observability
Line-oriented JSON/NDJSON and Nginx/Apache access logs — format, filter, validate, and CSV/TSV.
Kubernetes
Multi-doc manifests, structural validate, Ingress/Deployment starters, and Helm values formatting.
Networking / IP
CIDR, subnets, and IPv4/IPv6 helpers — in your browser.
Security & tokens
JWKS, X.509 certificates, and secrets scan — browser-local.
API & schemas
OpenAPI tools to format, validate, and lint your specs.
Encoding
Encode or decode Base64, URL components and HTML entities — client-side only.
Developer utilities
Timestamps, UUID, ULID, Nanoid, cron, passwords, regex, slugify, number bases, case, text diff, and chmod — all client-side.
Text & Markdown
Count words, build Markdown TOCs, and clean line lists — all in your browser.
Test Data
Synthetic field values for fixtures and DB seed — reserved-range phone numbers first.
Serialization
Serialize and deserialize PHP data structures beside JSON workflows.