Regex State Machine Visualizer - Online DFA Diagram
Enter a simple regular expression and see its equivalent Deterministic Finite Automaton diagram. Learn how regex engines work.
UD5 Toolkit
Online Railroad Diagram Generator â Visualize & Test Regular Expressions Instantly
Enter a regex above to generate its railroad diagram
| (alternation) operator. Loop arrows indicate repetition: a loop going forward and back means the element can repeat zero or more times (*), while a loop that requires going through at least once represents +. A bypass track (skipping an element) represents the ? quantifier (optional).
re, Java java.util.regex, and .NET regex. Most common syntax elements â character classes [...], groups (...), quantifiers *+?{n,m}, anchors ^$, and shorthand classes \d\w\s â are universally supported across flavors. Some advanced features like lookahead/lookbehind are rendered but may not be supported in all engines.
|, (2) loops that are too wide or too narrow for your intended matching behavior, (3) groups that don't encapsulate what you intended. Then use the "Test String Matching" section to run your pattern against sample text. Matches are highlighted, and you can see exactly which portions of the text are captured. Iterate between visualizing and testing until the behavior matches your expectations. The pattern breakdown section also provides a plain-English explanation of each component.
^ and $ to match line boundaries instead of just string boundaries; s (dotAll) makes . match newline characters too; u (unicode) enables full Unicode support including emoji and extended character classes like \p{...}. Toggle these flags above to see how they affect matching behavior in real-time.
\d matches non-ASCII digits, how lookbehind assertions work, and whether certain features like recursion or conditionals are supported. This tool runs in JavaScript, so it follows ECMAScript regex rules. If you're using Python, PHP, Java, or .NET, test with their respective engines for final validation. Always consult your language's regex documentation for edge cases.
Enter a simple regular expression and see its equivalent Deterministic Finite Automaton diagram. Learn how regex engines work.
Create seamless CSS background patterns like stripes, polka dots, checkerboard. Adjust size and colors. Copy the tiny CSS.
Draw walls on a grid and watch A*, Dijkstra, or BFS find the shortest path. Interactive animation. Learn graph traversal.
Generate a .gitattributes file with proper lineâending handling, binary detection, and linguist overrides. Clean repo setup.
Click through the TCP connection states (LISTEN, SYN_SENT, ESTABLISHEDâŚ) and see the animated transitions. Networking education.
Practice positive/negative lookahead and lookbehind. See matches highlighted live. Master advanced regex.
Select emojis and arrange them into a seamless tiling background. Copy the CSS dataâURI or download as image.
Build a vertical timeline by entering events with dates and descriptions. Export as image or HTML. Perfect for project milestones.
See the complete recursion tree for small Fibonacci or factorial calculations. Understand overlapping subproblems. Educational.
Paste your AcceptâLanguage header and see which languages your site should serve based on quality values. Internationalization helper.
Drag colored beads onto a virtual thread to design a repeating pattern. See total length. Save locally.
Create a rainbow gradient text animation using pure CSS. Customize speed and colors. Copy the code for your website.
Start from a base color and use `oklch(from color l c h)` to create lighter or darker variants. Copy the code.
Enter text and see each character's 8âbit binary laid out in a blackâandâwhite grid. Beautiful data art. Local.
Create outlined text with the textâstroke property. Adjust width and color. Preview and copy the CSS.
Paste plain text and turn it into a nested outline using indent levels or Markdown headings. Great for planning.
Build a simple decision tree by adding yes/no nodes. Flowchart style. Export as text outline.
Upload a small image and see it tiled as a canvas pattern. Export the pattern or copy the JavaScript.
Create simple 2â or 3âset Venn diagrams by entering commaâseparated lists. Shareable via URL fragment. No account.
Style underlines, overlines, and strike-throughs with colors, wavy styles, and thickness. Modern CSS textâdecoration.
Add, remove, push, pop items and watch the data structure change visually. Supports arrays, stacks, and queues. For CS students.
Create a repeating text pattern from a short string for watermarking documents or images. Download SVG pattern.
Visually name grid areas in a table and generate gridâtemplateâareas CSS. Perfect for complex layouts. Dragâfree.
Drag a slider to compare your original image with a compressed version (e.g., WebP). See the quality difference and file size savings.
Create a customizable scrolling marquee banner. Copy the HTML and CSS. For retro web projects or fun.
Beautify and format your CSS stylesheets instantly. Organize, minify, or prettify CSS code for better readability. Processed securely on client-side.
Watch classic sorting algorithms step through a randomized bar chart. Adjust speed and array size. Great for learning algorithm efficiency.
Drag and drop light sources, camera, and subject to plan a photo shoot. Export diagram as image. Simple and visual.
Stack multiple background images and blend them with colors. Create unique textures. Copy the CSS code instantly.
Enter a number and see an animated factor tree breaking it down to primes. Perfect for teaching factorization.