How to Enable or Disable NTFS File Compression in Windows

How to Configure NTFS File Compression in Windows blog banner image

NTFS file compression allows you to reduce the size of the files on your NTFS volume without affecting the data inside. It is handy for saving up disk space without affecting your files, as it does not make an archive of the files.

In this guide, we’ll cover how to enable or disable NTFS file compression in Windows to help you maximize your storage space.

How to Enable NTFS File Compression

You can follow these steps to enable NTFS file compression and check whether it is already enabled or disabled.

Method 1: Using Windows File Explorer

  1. Press Win+E to launch the File Explorer window and find the file or folder you want to compress.
  2. Right-click on that folder and go to Properties. In the pop-up window, go to the General tab.
  3. Under Attributes, click on Advanced.
  4. In the pop-up window, check on Compress contents to save disk space. If you are compressing a folder, a prompt will pop up, asking you to choose between applying changes only to the selected folder and applying changes to the selected folder and subfolders.
  5. Click OK to apply changes.

Method 2: Using Command Prompt (compact.exe)

  1. Open an elevated command prompt.
  2. Enter the following command into the prompt and then press Enter:
    fsutil behavior set disablecompression 0
  3. Close the command prompt and restart your device to apply the changes.

How to Disable NTFS File Compression

Method 1: Using Windows File Explorer

  1. Right-click on your intended file or folder and choose Properties.
  2. Under the General tab, click the Advanced button.
  3. Uncheck Compress Contents to Save Disk Space and then choose OK.
  4. Select Apply, then OK to apply the changes.

Method 2: Using Command Prompt (compact.exe)

  1. Open an elevated command prompt.
  2. Enter the following command into the prompt and then press Enter:
    fsutil behavior set disablecompression 1
  3. Close the command prompt and restart your device to turn off NTFS compression.

Enabling or Disabling NTFS Compression for an Entire Drive

You can enable or disable NTFS compression for an entire drive using File Explorer.

To enable:

  1. Press Windows+E to open File Explorer.
  2. Right-click on the drive you want to compress, then find and click on Properties.
  3. Under the General tab, turn on Compress this drive to save disk space.
  4. Choose Apply then click OK, which will open a prompt window.
  5. Choose Apply changes to Drive [drive letter], subfolders, and files to enable compression. Substitute [drive letter] with your intended drive.
  6. Click OK to apply the changes.

To disable:

  1. Right-click on the compressed drive and choose Properties.
  2. Again, go to the General tab and turn off Compress this drive to save disk space.
  3. Click Apply, then OK to apply the changes.

Understanding NTFS file compression

There are pros and cons to NTFS file compression. While it can primarily save up disk space, there is still a chance that the data compression could affect system performance.

NTFS works by decompressing a compressed NTFS file that has been copied or moved to a different folder. It then copies or moves the file again to a new location and recompresses it. The compressed files can also expand before being copied over the network, which doesn’t save any bandwidth.

3 Best use cases for enabling NTFS compression

  1. Saving disk space

As mentioned previously, the main benefit of NTFS is that it can save you some disk space. This is particularly useful if you have big files that contain redundant data, like log files, backups, and more. By maximizing NTFS compression, you could potentially save up to 50% of disk space.

  1. Improving performance

While NTFS compression could affect some areas of system performance during the processing period, the aftermath could significantly improve it. After compression, disk space could be freed up, and your CPU won’t have to work as hard to compensate for the heavy load.

  1. Reducing disk I/O and transfers

NTFS compression also reduces disk I/O and transfers, which can reduce the amount of data that it reads and writes. This can speed up access and lessen the wear on the disk, increasing the cache efficiency.

When should you avoid NTFS compression?

While NTFS compression has many benefits and use cases, it also has drawbacks. While compression saves space, it can also create inefficiencies in the system.

If you already have a slow CPU

Decompressing uses extra CPU power, so it is best used for files that are easier to compress, such as text or data files. This is because it requires more processing power when compressing and decompressing any data. This might not be ideal for you if you already have a slow CPU or a high load.

If you want to avoid fragmented files

NTFS compression could also make files more fragmented and take up more space than usual, especially as it compresses data in clusters of 16 KB. If a file doesn’t fit perfectly into these chunks, this can result in wasted space and slower access time. Because the system has to read more chunks to get the data, the system could slow down.

If you want to compress large or encrypted files

NTFS also limits what you can compress. It may prevent you from compressing certain files or folders, such as encrypted files, system files, or files larger than 128 GB. For these types of files, it might be worthwhile to consider other compression options.

Troubleshooting common NTFS issues

NTFS file system corruption

NTFS files can become corrupted on rare occasions. To troubleshoot this issue, run the chkdsk /f command on the specific volume you want to check. You should receive a message telling you to adjust $BITMAP if any issues are found. It should read as follows:

Correcting errors in the master file table’s (MFT) BITMAP attribute. CHKDSK discovered free space marked as allocated in the volume bitmap. Windows has made corrections to the file system.

NTFS file allocation errors

NTFS supports hard links and reparse points, which allow you to link files to multiple folders or connect folders to other drives. However, using these features makes it trickier to determine how much space is actually being used on a drive.

A good fix is running CHKDSK, NTBackup, or disk quotas to accurately assess disk usage, as the File Explorer and dir may be limited.

Frequently Asked Questions (FAQs)

Does NTFS compression affect system performance?

NTFS compression can affect system performance both during and after compression. Because it requires high CPU usage, it can demand a lot from your system, particularly when it comes to high-volume files and data, such as videos or images.

Can I compress system files using NTFS compression?

As mentioned earlier, there are some files that cannot be compressed through NTFS, including system files. Compressing critical system files could potentially lead to system instability and cause malfunctioning.

How does NTFS compression compare to other compression methods (e.g., ZIP, third-party tools)?

Aside from NTFS, there are other file compression utilities and third-party tools you can use for larger files. Tools such as 7Zip and WinRAR can work with different compressed formats and even bigger files than NTFS can. However, it is worth noting that you will have to pay for these tools.

Maximize your storage space with NTFS file compression

Overall, the built-in Windows NTFS file compression utility is useful for condensing individual files while preserving the data inside as it is. It can help you free up some disk space to improve your system performance. However, it does come with file limitations and takes up high CPU usage.

Before you can enable this utility, make sure to assess whether the NTFS files you wish to compress fit the compression criteria.

Next Steps

Building an efficient and effective IT team requires a centralized solution that acts as your core service deliver tool. NinjaOne enables IT teams to monitor, manage, secure, and support all their devices, wherever they are, without the need for complex on-premises infrastructure.

Learn more about Ninja Endpoint Management, check out a live tour, or start your free trial of the NinjaOne platform.

You might also like

Ready to simplify the hardest parts of IT?
×

See NinjaOne in action!

By submitting this form, I accept NinjaOne's privacy policy.

NinjaOne Terms & Conditions

By clicking the “I Accept” button below, you indicate your acceptance of the following legal terms as well as our Terms of Use:

  • Ownership Rights: NinjaOne owns and will continue to own all right, title, and interest in and to the script (including the copyright). NinjaOne is giving you a limited license to use the script in accordance with these legal terms.
  • Use Limitation: You may only use the script for your legitimate personal or internal business purposes, and you may not share the script with another party.
  • Republication Prohibition: Under no circumstances are you permitted to re-publish the script in any script library belonging to or under the control of any other software provider.
  • Warranty Disclaimer: The script is provided “as is” and “as available”, without warranty of any kind. NinjaOne makes no promise or guarantee that the script will be free from defects or that it will meet your specific needs or expectations.
  • Assumption of Risk: Your use of the script is at your own risk. You acknowledge that there are certain inherent risks in using the script, and you understand and assume each of those risks.
  • Waiver and Release: You will not hold NinjaOne responsible for any adverse or unintended consequences resulting from your use of the script, and you waive any legal or equitable rights or remedies you may have against NinjaOne relating to your use of the script.
  • EULA: If you are a NinjaOne customer, your use of the script is subject to the End User License Agreement applicable to you (EULA).