# Dear ImGui Licensing Guide: MIT License Terms and Commercial Use

> Understand Dear ImGui licensing with our MIT License guide. Learn about free commercial use, terms, and copyright requirements. Get clarity on using Dear ImGui.

- Repository: [omar/imgui](https://github.com/ocornut/imgui)
- Tags: licensing-guide
- Published: 2026-07-28

---

**Dear ImGui is distributed under the permissive MIT License, allowing free commercial and non-commercial use with no attribution requirements beyond preserving the copyright notice.**

Dear ImGui is a bloat-free, immediate-mode graphical user interface library for C++ maintained in the ocornut/imgui repository. Understanding the Dear ImGui licensing terms is essential for developers integrating this library into proprietary applications, game engines, or open-source projects. The entire codebase—including core files, backends, and examples—falls under a single, permissive license that minimizes legal friction.

## MIT License Terms and Permissions

The repository's [`LICENSE.txt`](https://github.com/ocornut/imgui/blob/main/LICENSE.txt) contains the complete legal text, copyright 2014-2026 Omar Cornut. According to the source code analysis, the license grants broad permissions with minimal restrictions.

Key provisions for developers:

- **Free for commercial use** — Embed ImGui in proprietary software without royalty obligations or sales restrictions
- **Static linking permitted** — Link the library statically without exposing your own source code or object files
- **Modification rights** — Fork, modify, and redistribute the source code under any terms you choose
- **Minimal attribution** — Only requires preserving the copyright notice and license text in documentation or source distributions

The MIT License explicitly disclaims warranty, providing the software "as is" while removing reciprocal obligations found in copyleft licenses. This permissiveness makes ImGui suitable for closed-source game engines, commercial CAD tools, and proprietary embedded systems.

## Licensed Files and Repository Structure

All files in the ocornut/imgui repository share identical licensing terms. The core library consists of platform-agnostic source files:

- [`imgui.cpp`](https://github.com/ocornut/imgui/blob/main/imgui.cpp) and [`imgui.h`](https://github.com/ocornut/imgui/blob/main/imgui.h) — Public API implementation and declarations
- [`imgui_draw.cpp`](https://github.com/ocornut/imgui/blob/main/imgui_draw.cpp) — Vertex buffer generation and draw-list management  
- [`imgui_widgets.cpp`](https://github.com/ocornut/imgui/blob/main/imgui_widgets.cpp) — Standard widget implementations including buttons, sliders, and text fields
- [`imgui_tables.cpp`](https://github.com/ocornut/imgui/blob/main/imgui_tables.cpp) — Table layout system for complex grid UIs
- [`imgui_demo.cpp`](https://github.com/ocornut/imgui/blob/main/imgui_demo.cpp) — Self-contained demonstration and reference code

Renderer-specific backends located in the `backends/` directory—such as [`imgui_impl_glfw.cpp`](https://github.com/ocornut/imgui/blob/main/imgui_impl_glfw.cpp) and [`imgui_impl_opengl3.cpp`](https://github.com/ocornut/imgui/blob/main/imgui_impl_opengl3.cpp)—carry the same MIT License terms as the core library. Example applications in `examples/` are similarly licensed, ensuring uniform compliance across your entire integration stack.

## Practical Implementation Examples

### Basic UI Rendering Loop

The immediate-mode paradigm requires calling ImGui functions each frame. In [`imgui.cpp`](https://github.com/ocornut/imgui/blob/main/imgui.cpp), the `ImGui::Begin` and `ImGui::End` functions define window scopes, while `ImGui::Render` generates the `ImDrawData` structure consumed by your renderer.

```cpp
// Inside your main loop
ImGui::Begin("Hello, world!");
ImGui::Text("Dear ImGui %s", ImGui::GetVersion());
if (ImGui::Button("Click me"))
    printf("Button pressed!\n");
ImGui::End();

// After UI construction, render the draw data
ImGui::Render();
RenderImGuiDrawData(ImGui::GetDrawData());   // Backend-specific function

```

### GLFW and OpenGL 3 Backend Setup

Backend implementations in [`backends/imgui_impl_glfw.cpp`](https://github.com/ocornut/imgui/blob/main/backends/imgui_impl_glfw.cpp) and [`backends/imgui_impl_opengl3.cpp`](https://github.com/ocornut/imgui/blob/main/backends/imgui_impl_opengl3.cpp) handle platform-specific input and rendering translation.

```cpp
// Initialize ImGui context
IMGUI_CHECKVERSION();
ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO();
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;

// Initialize platform and renderer backends
ImGui_ImplGlfw_InitForOpenGL(window, true);
ImGui_ImplOpenGL3_Init("#version 150");

// Main loop
while (!glfwWindowShouldClose(window))
{
    glfwPollEvents();
    ImGui_ImplOpenGL3_NewFrame();
    ImGui_ImplGlfw_NewFrame();
    ImGui::NewFrame();

    // UI construction here

    ImGui::Render();
    ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
    glfwSwapBuffers(window);
}

// Cleanup
ImGui_ImplOpenGL3_Shutdown();
ImGui_ImplGlfw_Shutdown();
ImGui::DestroyContext();

```

### Using the Demo Window

`ImGui::ShowDemoWindow` is defined in [`imgui_demo.cpp`](https://github.com/ocornut/imgui/blob/main/imgui_demo.cpp) and serves as both a showcase and interactive reference for available widgets.

```cpp
bool show_demo = true;
while (running)
{
    // Frame setup
    if (show_demo)
        ImGui::ShowDemoWindow(&show_demo);
    // Render
}

```

## Summary

- Dear ImGui uses the MIT License, permitting commercial and proprietary use without copyleft obligations
- All core files ([`imgui.cpp`](https://github.com/ocornut/imgui/blob/main/imgui.cpp), [`imgui.h`](https://github.com/ocornut/imgui/blob/main/imgui.h), [`imgui_draw.cpp`](https://github.com/ocornut/imgui/blob/main/imgui_draw.cpp), etc.) and backends share identical licensing terms
- The license requires only preservation of copyright notices found in [`LICENSE.txt`](https://github.com/ocornut/imgui/blob/main/LICENSE.txt)
- Static linking and modification are explicitly allowed for proprietary applications
- No user-interface attribution is required beyond maintaining the license text in source distributions

## Frequently Asked Questions

### Is Dear ImGui free for commercial use?

Yes. The MIT License explicitly permits commercial use, including embedding the library in proprietary software, games, and commercial applications without royalty payments or source code disclosure requirements. You may sell products containing Dear ImGui code without financial obligation to the original author.

### Do I need to display ImGui attribution in my application?

No. While you must preserve the copyright notice and license text in your source distribution or documentation, the MIT License does not require displaying attribution within your application's user interface, splash screens, or about dialogs. The legal notice can reside in a `LICENSE` file or credits document.

### Can I statically link Dear ImGui without open-sourcing my project?

Yes. Unlike GPL or other copyleft licenses, the MIT License permits static linking with proprietary code. You may distribute binaries containing Dear ImGui object code without releasing your own source code, provided you include the original copyright notice and permission notice from [`LICENSE.txt`](https://github.com/ocornut/imgui/blob/main/LICENSE.txt).

### Does the license cover all files in the repository?

Yes. According to the repository structure in ocornut/imgui, all files—including core library components, backends in the `backends/` directory, and example code in `examples/`—fall under the same MIT License terms. This simplifies compliance when integrating multiple components from the codebase.