Skip to content

Programmatically Convert Postman, Insomnia, and OpenAPI to Bruno

As the majority of Bruno users are transitioning from another tool, we support the import of different file formats directly inside the desktop app, including the automatic conversion of scripts/tests from Postman to Bruno. 

However, sometimes you may want to do this programmatically. Whether it's collections in a different format you regularly receive from another team, or perhaps every time your OpenAPI spec gets updated, you want a Bruno collection created. 

For these situations, we're happy to provide a set of Bruno Converters!  In this blog we'll walk through how to install the converters, using them ad-hoc, and even integrating them into a CI/CD workflow. 


What Is Bruno Converter?

The Bruno Converters package is an official utility for converting files to Bruno collections. It helps you:

  • 🚚 Migrate your API collections from Postman, Insomnia, or OpenAPI into Bruno's collection format

  • 🔁 Automate the conversion process as part of your scripts or CI workflows

  • 💾 Preserve your folder structures, requests, and environments for a smooth transition

Whether you're switching tools or simply want to consolidate your collections into Bruno for Git-based workflows, this package helps you get there with minimal effort.

🔄 Supported Conversions

The package currently supports converting the following file types:

  • ✅ Postman (Collection and Environment)

  • ✅ Insomnia Collection

  • ✅ OpenAPI (YAML or JSON)

Prerequisites

To install Bruno converters on the system, you need:

  1. Node 
  2. NPM

Convert Postman to Bruno Collection

In this example we're going to use a Postman collection which is available on this GitHub repo. You can clone the entire repo or only download the collection (demo_collection.postman_collection.json) from the repository. This repo also contains script.js, which will help you to convert the Postman collection to Bruno, or you can follow the script mentioned below for the same.

Installation

You can install the Bruno converters package with your favourite node manager, such as NPM, Yarn or PNPM. In this example we're going to use NPM.


# with npm
npm install @usebruno/converters

# with yarn
yarn add @usebruno/converters

# with pnpm
pnpm add @usebruno/converters

💡 Pro Tip: You can install this package globally by adding -g after npm i to use it across your system.

Project Setup

The folder structure or project setup for this example is easy.

  1. Create folder and name it as postman-to-bruno
  2. Initialise the package.json file by running npm init -y on terminal
  3. Install the Bruno converters package with command mentioned above via CLI
  4. Download the Postman collection from the above GitHub repo into the folder.
  5. Create a script.js file inside your folder and paste the below code.

Make sure to replace path/to/postman-collection.json with ⁣demo_collection.postman_collection.json or any of your Postman collections you have inside your postman-to-bruno folder. Also, it'path/to/bruno-collection.json' could be any name of your choice just make sure to add .json at the end.


// script.js

const { postmanToBruno } = require('@usebruno/converters');
const { readFile, writeFile } = require('fs/promises');

async function convertPostmanToBruno(inputFile, outputFile) {
  try {
    const inputData = await readFile(inputFile, 'utf8');
    const brunoCollection = postmanToBruno(JSON.parse(inputData));
    await writeFile(outputFile, JSON.stringify(brunoCollection, null, 2));
    console.log('Conversion successful!');
  } catch (error) {
    console.error('Error during conversion:', error);
  }
}

convertPostmanToBruno(
  'path/to/postman-collection.json',
  'path/to/bruno-collection.json'
);

Read the official Bruno docs for more details.


Why Bruno Converters?

Feature Benefit
🔁 Supports multiple formats Migrate from Postman, Insomnia, or OpenAPI
📦 Install via npm or yarn Easy to set up
🧰 Programmatic and scriptable Automate migrations in CI/CD pipelines
💾 Outputs local bruno.json files Fully compatible with Bruno

Conclusion

Migrating to Bruno doesn’t mean you have to leave your existing API collections behind. With the official Bruno Converters, you can bring over your Postman, Insomnia, or OpenAPI collections and environments in just a few lines of code.

Whether you’re automating your workflows or just testing out Bruno, this tool ensures a smooth, scriptable, and flexible migration.

👉 Ready to make the switch? Install the converter, import your collections, and let Bruno take care of the rest.

Happy converting! ⚡