Website Tools

Mega Menu Generator

Build a mega menu from a simple text outline: top-level items with columns of links, plus plain top-level links. The generator uses the accessible disclosure pattern – real buttons with aria-expanded and aria-controls – so keyboard, screen reader and touch users can open panels. The small JavaScript closes panels with Escape, on outside click and when focus leaves the menu, and can optionally open panels on hover for mouse users.

  • Runs in your browser
  • No sign-up
  • Free to use
Start from an example

    How to use Mega Menu Generator

    1. Write the menu outline.
    2. Choose theme, colour and hover behaviour.
    3. Copy the HTML, CSS and JavaScript.
    4. Load the script with defer.

    Mega Menu Generator features

    Disclosure pattern

    Buttons with aria-expanded, not role="menu".

    Keyboard support

    Tab, Enter, Space and Escape.

    Columns

    Headings and link lists per panel.

    HTML, CSS, JS

    No framework needed.

    Live preview

    See the result in a sandboxed frame as you type.

    Accessible markup

    Semantic elements, labels, focus styles and contrast checks.

    When to use Mega Menu Generator

    • Online shops with many categories.
    • SaaS sites with product and resource menus.
    • University and public-sector sites.
    • Documentation portals.

    Mega Menu Generator FAQ

    Why not role="menu"?

    ARIA menus are for application menus with arrow-key navigation. Website navigation with links is better as a list of links with disclosure buttons.

    Does it work without JavaScript?

    The panels stay closed, so make sure top-level pages are also reachable through links.

    Is it mobile friendly?

    Panels become part of the page flow on small screens, and buttons work with touch.

    Why not open the menu on hover?

    Hover does not exist on touch screens and is unreliable for keyboard and screen reader users. Opening on click or Enter works for everyone.

    Big menus everyone can use

    Mega menus help when a site has many sections, but each panel should stay scannable: few columns, short labels and clear headings.

    Mega menus show many links in columns, which makes them hard to use with a keyboard or screen reader if they open on hover only. The generated menu uses the disclosure pattern: each top-level item is a real button with aria-expanded and aria-controls, so the panel opens on click, tap or Enter and its state is announced.

    The small script closes an open panel with Escape and returns focus to its button, and closes it when focus or a click moves elsewhere. Plain top-level links stay ordinary links. The text outline – items, columns and links – keeps the structure easy to edit.

    Keep column headings short and group links the way your visitors think, not by your internal departments. Test the menu with the Tab key and on a phone; on small screens the panels stack vertically.

    Other useful tools