About Regex2NFA

What is Regex2NFA?

Regex2NFA is an interactive tool that helps you understand how regular expressions are converted into Non-deterministic Finite Automata (NFAs). It provides a visual representation of the conversion process and allows you to simulate how the NFA processes input strings.

This tool is particularly useful for:

  • Learning about regular expressions and NFAs
  • Understanding the conversion process
  • Debugging and testing regular expressions
  • Visualizing automata theory concepts

Key Features

Interactive Visualization

Drag nodes, zoom in/out, and explore the NFA structure

Step-by-Step Simulation

Watch how the NFA processes each character of your input

Example Patterns

Pre-built examples to help you get started

How to Use

  1. 1.

    Enter a Regular Expression

    Use operators like | (or), * (zero or more), + (one or more), ? (optional), and () for grouping

  2. 2.

    Visualize the NFA

    Click the Visualize button to see the NFA representation

  3. 3.

    Test with Strings

    Enter test strings and use the simulation controls to see how the NFA processes them

Resources

View on GitHub

Built with Next.js, React, and vis.js

© 2025 Regex to NFA Visualizer. A CMSC 141 Project.Built by Escarlan, Arañas, Betonio and Va-ay