How to Remove Gridlines in Google Sheets (3 Easy Ways)

To remove gridlines in Google Sheets, open View > Show and click Gridlines to clear its checkmark. This hides gridlines on the current sheet.

Screen and print gridlines use separate controls. You can also mask lines in one selected range or automate the sheet setting with Apps Script.

Hide gridlines on the current sheet

  1. Open the View menu.
  2. Point to Show.
  3. Click Gridlines to clear its checkmark.
View > Show > Gridlines controls on-screen gridlines

The cells remain editable, but their faint default outlines disappear. Borders you added manually stay visible.

A sheet with gridlines hidden and its data retained

This setting applies to one sheet tab. Repeat the steps on other tabs where you also want a cleaner canvas.

To restore the lines, return to View > Show > Gridlines and click the option again.

Hide lines in a selected range

Google Sheets provides the gridline toggle at sheet level. For one range, white borders can visually cover the default lines on a white sheet.

  1. Select the range whose lines you want to mask.
  2. Open the Borders tool and set Border color to white.
  3. Choose All borders.

With gridlines enabled, the tested A2:C4 range lost its visible internal lines after white borders were applied. Gridlines remained visible outside the range.

Remove gridlines when printing

Hiding gridlines on screen does not automatically clear the print setting. The live test still showed Show gridlines checked in Print settings.

  1. Select the cells you want to print, if you need only part of the sheet.
  2. Choose File > Print. On Windows, Ctrl + P opens the same settings.
  3. Choose the required print scope.
  4. Expand Formatting and clear Show gridlines.
  5. Continue to Next when the preview looks correct.
Show gridlines cleared under Formatting in Google Sheets print settings

The preview updates after you clear the setting. This controls default gridlines in the printout, independent of their on-screen visibility.

Hide gridlines with Apps Script

Apps Script can change the real sheet-level gridline setting. This is useful when a repeatable workflow should hide lines on a known sheet.

  1. Choose Extensions > Apps Script.
  2. Add a separate script file, then paste the code below. Keep existing files unless you know they are disposable.
  3. Save the project and run hideTestGridlines.
  4. On a first run, review the code and requested permissions before authorizing it.
/** @OnlyCurrentDoc */
function hideTestGridlines() {
  const sheet = SpreadsheetApp.getActiveSpreadsheet()
    .getSheetByName('GS-Test-Gridlines');

  if (!sheet) {
    throw new Error('Sheet not found: GS-Test-Gridlines');
  }

  sheet.setHiddenGridlines(true);
  console.log(`Hidden: ${sheet.hasHiddenGridlines()}`);
}

Change GS-Test-Gridlines to the exact name of your target tab. The explicit name prevents the script from changing whichever tab happens to be active.

The tested script completed and logged Hidden: true. To show the lines again, change setHiddenGridlines(true) to setHiddenGridlines(false) and rerun it.

For setup and permission details, see the introduction to Apps Script in Google Sheets.

Gridlines and borders are different

FeatureGridlinesBorders
PurposeDefault visual guides for cellsFormatting added to chosen cells
ScopeShown or hidden for a sheetApplied to selected cells or ranges
StyleNo color, thickness, or line-style controlsColor and line style can be customized
PrintingControlled by Show gridlines in Print settingsRemain in the printout unless removed or restyled

Use the View or Apps Script method for true sheet-level control. Use borders when you need deliberate lines around particular cells.

Other Google Sheets articles you may also like

Leave a Comment