Free tool / No sign-up
Elementor widget generator.
Add controls, preview the widget, and download the PHP. Nothing to install.
Loading the Elementor widget generator. It needs JavaScript turned on.
Custom Elementor widgets and addons with dynamic data and editor-friendly controls, built and tested on your site. Free review and a fixed quote.
See the serviceAbout this tool
Elementor widget generator: what it does.
This Elementor widget code generator builds a custom widget in your browser and gives you working code. Add Content, Style and Advanced controls, see a live preview at desktop, tablet and mobile widths, and download a complete plugin zip, a snippet for Code Snippets or WPCode, or one widget class file. The code needs only free Elementor, escapes every value it prints, and was tested in WordPress with Elementor 4.4.0. It's free, there's no sign-up, and nothing leaves your browser.
How to use it
How to use this Elementor widget creator.
1. Name the plugin and set a short prefix. The prefix goes in front of every widget name, class and CSS class, so your code doesn't clash with other plugins. One plugin can hold several widgets: add, duplicate, reorder or remove them in the list at the top.
2. Give the widget a title, a slug and a panel icon. The title is what editors see in the Elementor panel. Don't change the slug after the widget is on live pages, because Elementor stores pages by widget name.
3. Add controls to the Content, Style and Advanced tabs, in sections, just as they appear in Elementor's panel. A Content control can print an element: a heading, a paragraph, an image, a link, an icon or a list. A Style control writes CSS through selectors. You pick the element it styles and the CSS property, and the generator writes the selector for you.
4. Set default values and watch the live preview. Switch between Desktop, Tablet and Mobile to check responsive values.
5. Fix any problems in the list above the code, then download the format you need. Your work is saved in this browser, and Export JSON keeps a copy you can import later or on another computer.
The builder works fully by keyboard and screen reader. Every action has a button, including moving controls up and down, so nothing depends on dragging. A status message announces each change.
Controls
Every control type an Elementor widget builder needs.
The generator covers the controls most custom widgets use. Each one follows Elementor's own control API, so the panel looks and behaves like a built-in widget.
| Control | What the generated code does |
|---|---|
| Text, Textarea, Rich text, Number | Prints the value in the tag you choose, with inline editing in the editor. A text control can add a select so editors pick the heading level. |
| Image, Link, Icon | Prints an image with an image-size choice, a link with the new-tab and nofollow options, or an icon from Elementor's icon library. |
| Select, Choose, Switcher | Adds a class to the widget for the chosen value, writes CSS, or shows and hides other controls through conditions. |
| Color, Slider, Dimensions | Write CSS with Elementor's placeholders: VALUE, SIZE and UNIT, or one value per side. |
| Repeater | A list of items with their own fields, such as icon list rows or team members, with default items. |
| Typography, Background, Border, Box shadow, Text shadow, CSS filters | Elementor's group controls, with defaults you set. |
| Responsive, hover and conditions | Separate tablet and mobile values, Normal and Hover tabs, and controls that appear only when another control has a value. |
Classic or atomic
Classic widgets and atomic (Editor v4) widgets.
Classic widgets extend Elementor's Widget_Base class. That is the stable, documented way to build a custom widget, and it's what this generator makes by default. Classic widgets work in Elementor 4 and run next to the new v4 elements on the same page.
Atomic widgets are the new element type in Elementor's Editor v4. Elementor hasn't released a public API for third-party atomic widgets yet. In GitHub discussion #32950, Elementor staff wrote on 24 June 2026: "We won't be releasing an API soon". The classes exist in Elementor 4.4.0, though, and the generator can add an experimental atomic version of a widget for developers who want to try them.
The experimental option writes the atomic class, its props schema, its controls and a Twig template. The plugin registers it only when the Atomic Widgets feature is on, and it always registers the classic version too, so pages keep working if a future Elementor release changes the atomic classes. It supports Text, Textarea, Number, Select, Switcher and Link controls. Use it to experiment, not for client sites.
Which output
Plugin zip, snippet or class file: which to download.
All three come from the same widget definition, so the widget behaves the same way in each.
| Output | Best for |
|---|---|
| Plugin (.zip) | Most sites. A complete plugin with a header, a check that Elementor is active and new enough, an admin notice if it isn't, your own widget category, a widgets folder, and stylesheets that load only on pages that use each widget. |
| Snippet (.php) | Sites that already use Code Snippets or WPCode, or a child theme's functions.php. One paste, no files. The CSS is printed inline, and the widget classes are declared inside the Elementor hook, so the site doesn't break if Elementor is turned off. |
| Widget class (.php) | Developers adding one widget to a plugin they already have. The file comments show the lines that register it. |
Install
How to install the widget.
Plugin zip: in WordPress, go to Plugins, then Add New Plugin, then Upload Plugin. Choose the zip, install it and activate it. Open a page with Elementor and search the panel for your widget's title. It sits in the category you named.
Code Snippets: add a new snippet, paste the code without the opening <?php line, and choose Run snippet everywhere. WPCode: add a PHP Snippet, paste the same code, and set it to run everywhere. functions.php: paste the snippet at the end of a child theme's functions.php file, so a theme update doesn't remove it.
Elementor Pro's Custom Code feature can't run PHP, so a widget can't be added there. A widget always needs PHP that runs on the server.
Preview
What the live preview shows, and what it can't.
The preview renders the widget's HTML from the same definition that writes the PHP render() method and the editor's JavaScript template, so the three always match. It wraps the widget in Elementor's wrapper classes, uses your default values, and applies the CSS your selectors write. Tablet and Mobile use Elementor's default breakpoints, 1024 and 767 pixels.
It can't show your theme's styles, Global Colors and Fonts, dynamic tags, ACF fields, Elementor's Advanced tab effects or Pro features, because those need WordPress. Icons show as a placeholder star and images as a grey placeholder. Test the downloaded widget on a staging site before you use it on a live one.
Security
Every value is escaped by type.
Anything an editor types can end up on the page, so the generated render() method escapes every value for where it's printed. In tests, a title set to a script tag printed as plain text in both the PHP output and the editor preview, and a javascript: link printed as an empty link.
| Value | How the generated code prints it |
|---|---|
| Text and numbers | esc_html(), after reading settings with get_settings_for_display() so dynamic tags work |
| Textarea and rich text | wp_kses_post(), which keeps safe HTML such as bold text and links and removes scripts |
| Links | add_link_attributes(), which escapes the address and adds the new-tab and nofollow options |
| Classes and attributes | Elementor's render attributes, which escape with esc_attr(), plus sanitize_html_class() for values |
| HTML tags | Elementor's validated tag helper, so editors can only choose from allowed tags |
Tested
Tested in WordPress before launch.
The generated code was installed on a test site with WordPress 7.1 and Elementor 4.4.0 on PHP 7.4 and 8.2: a plugin with three widgets, a snippet, and an atomic widget with the Atomic Widgets feature on and off. Every widget registered, rendered on a page, opened in the Elementor editor with all its controls, and re-rendered in the editor after its settings changed. The plugin needs Elementor 3.20 or newer and PHP 7.4 or newer.
It also follows Elementor 4's current conventions: the elementor/widgets/register hook, no inner wrapper div by default for leaner markup, and static output marked as cacheable so Element Caching can store it. Both settings can be changed per widget.
What's new
Changes to the generator.
November 2026: first version, with classic widgets, an experimental atomic version, several widgets per plugin, a live preview, and plugin, snippet and class file downloads.
Need more?
When a generated widget isn't enough.
A generator covers the structure: controls, markup and styles. Widgets that pull data from an API or custom fields, run queries, need JavaScript interactions, or ship as a full addon with settings and updates need custom code. For the code itself, the custom Elementor widget guide walks through a complete widget line by line. If you'd rather hand it over, I build Elementor widgets and addons, tested on your site. Free review and a fixed quote.
Questions
Elementor Widget Generator FAQs
Is this Elementor widget generator free?+
Yes. It's free with no sign-up and no plugin to install. It runs in your browser, and the code it writes is yours to use on any site.
Does the generated widget need Elementor Pro?+
No. The widget class, controls, group controls and registration hook are all part of free Elementor. Pro is only needed if you turn on dynamic tags for a control.
Can I paste the widget into Elementor's Custom Code?+
No. Elementor Pro's Custom Code adds HTML, CSS and JavaScript to pages, and it can't run PHP. Install the plugin zip, or paste the snippet into Code Snippets, WPCode or a child theme's functions.php.
Should I use the snippet or the plugin zip?+
Use the plugin zip for most sites: it checks that Elementor is active, loads its CSS only where the widget is used, and keeps working when you change themes. The snippet suits sites that already manage code with Code Snippets or WPCode.
Can it create Elementor atomic (v4) widgets?+
Yes, as an experiment. Elementor has no public API for third-party atomic widgets yet, so the generator adds an atomic version only on request, registers it only when the Atomic Widgets feature is on, and always keeps a classic version as the fallback.
Will my widget keep working after Elementor updates?+
Classic widgets use Elementor's documented API, and Elementor announces deprecations in advance. The generated code uses the current hook and methods and none of the deprecated ones. The experimental atomic version can break in a future release; the classic version still works if it does.
Elementor addon development
Need a widget that does more?
Send me the site address and what you need. I’ll reply with a clear next step within 24 hours.
Free review and a fixed quote.
bealinawaz@gmail.com