Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
VigneshSami
Regular Visitor

How to edit PBIX (unzip → modify → rezip) without corruption?

Hi all,

I’m trying to update a PBIX file’s display name outside of Power BI Desktop by unzipping, editing, and rezipping the file.

What I did:

  1. Renamed MyReport.pbix → MyReport.zip and extracted it.

  2. Found Report/Layout (sometimes plain JSON, sometimes looks compressed).

  3. Changed the "name" property:

    Before:

     
    { "name": "Sales Report" }

    After:

     
    { "name": "Sales Report - Updated" }
  4. Zipped the contents back and renamed to .pbix.

Problem:

  • Power BI says the file is corrupted after modification.

  • I suspect it’s either due to the Layout file’s encoding/compression (UTF-8, UTF-16, gzip) or the zipping structure.

Questions:

  1. Is the display name stored only in Report/Layout or also in Metadata?

  2. What encoding/compression should Layout use so PBIX stays valid?

  3. Has anyone successfully unzipped → edited → rezipped a PBIX? What’s the exact process?

My goal is to later automate this, but even the manual process breaks. Any guidance would be greatly appreciated

1 ACCEPTED SOLUTION
Poojara_D12
Super User
Super User

Hi @VigneshSami 

A PBIX file is essentially a structured package with strict internal formatting, so manually unzipping, editing, and rezipping it almost always leads to corruption if the structure or encoding is even slightly altered. The display name you see in Power BI is not stored only in Report/Layout but also referenced in Metadata and other internal JSON parts, and Layout itself can sometimes be compressed in a proprietary way rather than plain UTF-8 JSON. If you edit only the Layout file and rezip, Power BI won’t be able to parse it because the package structure, file order, or compression flags no longer match what the engine expects. The zip must be recreated exactly (store vs. deflate compression, folder hierarchy preserved), and the JSON must maintain its original encoding. In practice, Microsoft does not support PBIX manipulation by editing internal files; the only reliable way to change the report name is either in Power BI Desktop before saving, or through the Power BI REST API or XMLA endpoints once the file is published. If your goal is automation, scripting against the REST API is the supported and safe method, while direct PBIX surgery is fragile and not recommended because the format is undocumented and can change between versions.

 

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS

View solution in original post

4 REPLIES 4
VigneshSami
Regular Visitor

Hi @Poojara_D12@Thomaslleblanc and @v-agajavelly
Thank you for all your replies,

Yesterday I asked about unzipping a .pbix, modifying its contents, and rezipping it — but I learned this often leads to corruption because of encoding, compression, or integrity checks.

For my understanding, could you please clarify:

  1. What are the supported or safer options (besides raw unzip/rezip) for modifying or automating edits in Power BI files such as .pbix, .pbit, or .pbir?

  2. How do tools like pbi-tools work compared to manual unzip/rezip?

  3. Is the PBIP (Developer Mode) project format the recommended approach for version control or scripted modifications?

  4. I’ve also heard that some Power BI CLIs might stop working in the upcoming days — is that true, and if so, what are the alternative ways to automate or script modifications going forward?

  5. For simple edits (e.g., changing theme colors, JSON layout tweaks), is there any reliable workflow that avoids file corruption?

  6. Are there any official APIs or Microsoft-recommended methods to programmatically modify report definitions or layouts instead of touching the zip structure directly?

Thanks in advance for shedding light on which approaches are practical and how they work

v-agajavelly
Community Support
Community Support

Hi @VigneshSami ,

Thanks to both @Thomaslleblanc  and @Poojara_D12  for jumping in here.

@VigneshSami did you get a chance to look at what the super users suggested? As they’ve pointed out, a PBIX isn’t designed to be manually unzipped/edited/rezipped, and even tiny changes (file order in the zip, compression type, encoding differences) will make the file unreadable. The “name” is also not just in Report/Layout but referenced in multiple places including Metadata, and parts of Layout can be compressed in proprietary ways, so changing it directly almost always breaks the package.

If your end goal is automation, the supported options today are:

Direct “PBIX surgery” will stay fragile and unsupported, so automation through the API or PBIP format is really the way forward.

Regards,
Akhil.

Poojara_D12
Super User
Super User

Hi @VigneshSami 

A PBIX file is essentially a structured package with strict internal formatting, so manually unzipping, editing, and rezipping it almost always leads to corruption if the structure or encoding is even slightly altered. The display name you see in Power BI is not stored only in Report/Layout but also referenced in Metadata and other internal JSON parts, and Layout itself can sometimes be compressed in a proprietary way rather than plain UTF-8 JSON. If you edit only the Layout file and rezip, Power BI won’t be able to parse it because the package structure, file order, or compression flags no longer match what the engine expects. The zip must be recreated exactly (store vs. deflate compression, folder hierarchy preserved), and the JSON must maintain its original encoding. In practice, Microsoft does not support PBIX manipulation by editing internal files; the only reliable way to change the report name is either in Power BI Desktop before saving, or through the Power BI REST API or XMLA endpoints once the file is published. If your goal is automation, scripting against the REST API is the supported and safe method, while direct PBIX surgery is fragile and not recommended because the format is undocumented and can change between versions.

 

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS
Thomaslleblanc
Super User
Super User

This is not supported by Microsoft. You can start using the pbip or pbir formats for saving previous pbix file, but this is still in preview. - https://powerbi.microsoft.com/en-us/blog/power-bi-enhanced-report-format-pbir-in-power-bi-desktop-de... 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors