Jupyter Notebook has two modes, and every shortcut on this page depends on knowing which one you are in: Edit mode types into a cell, Command mode acts on cells with single letters. The table follows the classic notebook and JupyterLab, which share these keys. The habit that makes Jupyter fast is pressing Esc, doing cell work with letters, and pressing Enter to type again.
Notebook (51)
| Shortcut | Action | What it does |
|---|---|---|
| Tab | Invoke notebook | Command: completer:invoke-notebook. |
| Y | Change cell to code | Command: notebook:change-cell-to-code. |
| 1 | Change cell to heading 1 | Command: notebook:change-cell-to-heading-1. |
| 2 | Change cell to heading 2 | Command: notebook:change-cell-to-heading-2. |
| 3 | Change cell to heading 3 | Command: notebook:change-cell-to-heading-3. |
| 4 | Change cell to heading 4 | Command: notebook:change-cell-to-heading-4. |
| 5 | Change cell to heading 5 | Command: notebook:change-cell-to-heading-5. |
| 6 | Change cell to heading 6 | Command: notebook:change-cell-to-heading-6. |
| M | Change cell to markdown | Command: notebook:change-cell-to-markdown. |
| R | Change cell to raw | Command: notebook:change-cell-to-raw. |
| C | Copy cell | Command: notebook:copy-cell. |
| X | Cut cell | Command: notebook:cut-cell. |
| D, D | Delete cell | Command: notebook:delete-cell. |
| Esc | Enter command mode (edit mode) | Command: notebook:enter-command-mode. |
| Ctrl + M | Enter command mode (edit mode) | Command: notebook:enter-command-mode. |
| Alt + Up | Access previous history entry (edit mode) | Command: notebook:access-previous-history-entry. |
| Alt + Down | Access next history entry (edit mode) | Command: notebook:access-next-history-entry. |
| Enter | Enter edit mode | Command: notebook:enter-edit-mode. |
| Shift + Up | Extend marked cells above | Command: notebook:extend-marked-cells-above. |
| Shift + K | Extend marked cells above | Command: notebook:extend-marked-cells-above. |
| Shift + Home | Extend marked cells top | Command: notebook:extend-marked-cells-top. |
| Shift + Down | Extend marked cells below | Command: notebook:extend-marked-cells-below. |
| Shift + End | Extend marked cells bottom | Command: notebook:extend-marked-cells-bottom. |
| Shift + J | Extend marked cells below | Command: notebook:extend-marked-cells-below. |
| A | Insert cell above | Command: notebook:insert-cell-above. |
| B | Insert cell below | Command: notebook:insert-cell-below. |
| Shift + M | Merge cells | Command: notebook:merge-cells. |
| Ctrl + Backspace | Merge cell above | Command: notebook:merge-cell-above. |
| Ctrl + Shift + M | Merge cell below | Command: notebook:merge-cell-below. |
| Down | Move cursor down | Command: notebook:move-cursor-down. |
| J | Move cursor down | Command: notebook:move-cursor-down. |
| Up | Move cursor up | Command: notebook:move-cursor-up. |
| K | Move cursor up | Command: notebook:move-cursor-up. |
| Left | Move cursor heading above or collapse | Command: notebook:move-cursor-heading-above-or-collapse. |
| Right | Move cursor heading below or expand | Command: notebook:move-cursor-heading-below-or-expand. |
| Shift + A | Insert heading above | Command: notebook:insert-heading-above. |
| Shift + B | Insert heading below | Command: notebook:insert-heading-below. |
| Ctrl + Shift + Left | Collapse all headings | Command: notebook:collapse-all-headings. |
| Ctrl + Shift + Right | Expand all headings | Command: notebook:expand-all-headings. |
| V | Paste cell below | Command: notebook:paste-cell-below. |
| Shift + Z | Redo cell action | Command: notebook:redo-cell-action. |
| Ctrl + Enter | Run cell | Command: notebook:run-cell. |
| Alt + Enter | Run cell and insert below | Command: notebook:run-cell-and-insert-below. |
| Shift + Enter | Run cell and select next (edit mode) | Command: notebook:run-cell-and-select-next. |
| Shift + L | Line numbering | Command: viewmenu:line-numbering. |
| Ctrl + A | Select all | Command: notebook:select-all. |
| Ctrl + Shift + - | Split cell at cursor (edit mode) | Command: notebook:split-cell-at-cursor. |
| Z | Undo cell action | Command: notebook:undo-cell-action. |
| Shift + R | Toggle render side by side current | Command: notebook:toggle-render-side-by-side-current. |
| Ctrl + Shift + Up | Move cell up | Command: notebook:move-cell-up. |
| Ctrl + Shift + Down | Move cell down | Command: notebook:move-cell-down. |
Application & layout (30)
| Shortcut | Action | What it does |
|---|---|---|
| Ctrl + Shift + ] | Activate next tab | Command: application:activate-next-tab. |
| Ctrl + Shift + [ | Activate previous tab | Command: application:activate-previous-tab. |
| Ctrl + Shift + . | Activate next tab bar | Command: application:activate-next-tab-bar. |
| Ctrl + Shift + , | Activate previous tab bar | Command: application:activate-previous-tab-bar. |
| Alt + W | Close | Command: application:close. |
| Ctrl + Shift + D | Toggle mode | Command: application:toggle-mode. |
| Ctrl + B | Toggle left area | Command: application:toggle-left-area. |
| Ctrl + J | Toggle right area | Command: application:toggle-right-area. |
| F11 | Toggle fullscreen mode | Command: application:toggle-fullscreen-mode. |
| Alt + 1 | Toggle sidebar widget | Command: application:toggle-sidebar-widget. |
| Alt + 2 | Toggle sidebar widget | Command: application:toggle-sidebar-widget. |
| Alt + 3 | Toggle sidebar widget | Command: application:toggle-sidebar-widget. |
| Alt + 4 | Toggle sidebar widget | Command: application:toggle-sidebar-widget. |
| Alt + 5 | Toggle sidebar widget | Command: application:toggle-sidebar-widget. |
| Alt + 6 | Toggle sidebar widget | Command: application:toggle-sidebar-widget. |
| Alt + 7 | Toggle sidebar widget | Command: application:toggle-sidebar-widget. |
| Alt + 8 | Toggle sidebar widget | Command: application:toggle-sidebar-widget. |
| Alt + 9 | Toggle sidebar widget | Command: application:toggle-sidebar-widget. |
| Alt + 0 | Toggle sidebar widget | Command: application:toggle-sidebar-widget. |
| Alt + Shift + 1 | Toggle sidebar widget | Command: application:toggle-sidebar-widget. |
| Alt + Shift + 2 | Toggle sidebar widget | Command: application:toggle-sidebar-widget. |
| Alt + Shift + 3 | Toggle sidebar widget | Command: application:toggle-sidebar-widget. |
| Alt + Shift + 4 | Toggle sidebar widget | Command: application:toggle-sidebar-widget. |
| Alt + Shift + 5 | Toggle sidebar widget | Command: application:toggle-sidebar-widget. |
| Alt + Shift + 6 | Toggle sidebar widget | Command: application:toggle-sidebar-widget. |
| Alt + Shift + 7 | Toggle sidebar widget | Command: application:toggle-sidebar-widget. |
| Alt + Shift + 8 | Toggle sidebar widget | Command: application:toggle-sidebar-widget. |
| Alt + Shift + 9 | Toggle sidebar widget | Command: application:toggle-sidebar-widget. |
| Alt + Shift + 0 | Toggle sidebar widget | Command: application:toggle-sidebar-widget. |
| Ctrl + Shift + U | Show panel | Command: property-inspector:show-panel. |
File browser (9)
| Shortcut | Action | What it does |
|---|---|---|
| Backspace | Go up | Command: filebrowser:go-up. |
| Delete | Delete | Command: filebrowser:delete. |
| Ctrl + X | Cut | Command: filebrowser:cut. |
| Ctrl + C | Copy | Command: filebrowser:copy. |
| Ctrl + V | Paste | Command: filebrowser:paste. |
| F2 | Rename | Command: filebrowser:rename. |
| Ctrl + D | Duplicate | Command: filebrowser:duplicate. |
| Ctrl + A | Select all | Command: filebrowser:select-all. |
| Ctrl + Shift + F | Show panel | Command: filebrowser:show-panel. |
Image viewer (8)
| Shortcut | Action | What it does |
|---|---|---|
| H | Flip horizontal | Command: imageviewer:flip-horizontal. |
| V | Flip vertical | Command: imageviewer:flip-vertical. |
| I | Invert colors | Command: imageviewer:invert-colors. |
| 0 | Reset image | Command: imageviewer:reset-image. |
| ] | Rotate clockwise | Command: imageviewer:rotate-clockwise. |
| [ | Rotate counterclockwise | Command: imageviewer:rotate-counterclockwise. |
| = | Zoom in | Command: imageviewer:zoom-in. |
| - | Zoom out | Command: imageviewer:zoom-out. |
Mainmenu (8)
| Shortcut | Action | What it does |
|---|---|---|
| Ctrl + Shift + Z | Redo | Command: editmenu:redo. |
| Ctrl + Z | Undo | Command: editmenu:undo. |
| Ctrl + Shift + Q | Close and cleanup | Command: filemenu:close-and-cleanup. |
| I, I | Interrupt | Command: kernelmenu:interrupt. |
| 0, 0 | Restart | Command: kernelmenu:restart. |
| Shift + Enter | Run | Command: runmenu:run. |
| Ctrl + Shift + ' | Activate previously used tab | Command: tabsmenu:activate-previously-used-tab. |
| Ctrl + Shift + T | Reopen last | Command: recentmenu:reopen-last. |
Code editor (6)
| Shortcut | Action | What it does |
|---|---|---|
| Ctrl + D | Delete line | Command: codemirror:delete-line. |
| Ctrl + Shift + K | Delete line | Command: codemirror:delete-line. |
| Alt + A | Toggle block comment | Command: codemirror:toggle-block-comment. |
| Ctrl + / | Toggle comment | Command: codemirror:toggle-comment. |
| Ctrl + Shift + D | Select next occurrence | Command: codemirror:select-next-occurrence. |
| Ctrl + B | Markdown toggle bold | Command: codemirror:markdown-toggle-bold. |
Debugger (6)
| Shortcut | Action | What it does |
|---|---|---|
| Ctrl + Shift + E | Show panel | Command: debugger:show-panel. |
| F9 | Continue | Command: debugger:continue. |
| Shift + F9 | Terminate | Command: debugger:terminate. |
| F10 | Next | Command: debugger:next. |
| F11 | StepIn | Command: debugger:stepIn. |
| Shift + F11 | StepOut | Command: debugger:stepOut. |
Search (6)
| Shortcut | Action | What it does |
|---|---|---|
| Ctrl + F | Start | Command: documentsearch:start. |
| Ctrl + H | StartWithReplace | Command: documentsearch:startWithReplace. |
| Ctrl + G | HighlightNext | Command: documentsearch:highlightNext. |
| Ctrl + Shift + G | HighlightPrevious | Command: documentsearch:highlightPrevious. |
| Alt + L | ToggleSearchInSelection | Command: documentsearch:toggleSearchInSelection. |
| Esc | End | Command: documentsearch:end. |
Completer (5)
| Shortcut | Action | What it does |
|---|---|---|
| Alt + ] | Next | Command: inline-completer:next. |
| Alt + [ | Previous | Command: inline-completer:previous. |
| Tab | Accept | Command: inline-completer:accept. |
| Alt + End | Accept | Command: inline-completer:accept. |
| Alt + \ | Invoke | Command: inline-completer:invoke. |
Console (4)
| Shortcut | Action | What it does |
|---|---|---|
| Tab | Invoke console | Command: completer:invoke-console. |
| Shift + Enter | Run forced | Command: console:run-forced. |
| Ctrl + Enter | Linebreak | Command: console:linebreak. |
| Enter | Run unforced | Command: console:run-unforced. |
Tooltip (4)
| Shortcut | Action | What it does |
|---|---|---|
| Esc | Dismiss | Command: tooltip:dismiss. |
| Shift + Tab | Launch console | Command: tooltip:launch-console. |
| Shift + Tab | Launch file | Command: tooltip:launch-file. |
| Shift + Tab | Launch notebook | Command: tooltip:launch-notebook. |
Command palette & settings (3)
| Shortcut | Action | What it does |
|---|---|---|
| Ctrl + Shift + C | Activate command palette | Command: apputils:activate-command-palette. |
| Ctrl + P | Command: apputils:print. | |
| Ctrl + Shift + H | Display shortcuts | Command: apputils:display-shortcuts. |
Other panels (11)
| Shortcut | Action | What it does |
|---|---|---|
| Ctrl + S | Save | Command: docmanager:save. |
| Ctrl + Shift + S | Save as | Command: docmanager:save-as. |
| Ctrl + Shift + B | Show panel | Command: running:show-panel. |
| Ctrl + Alt + A | Show modal | Command: running:show-modal. |
| Ctrl + , | Open | Command: settingeditor:open. |
| Ctrl + S | Save | Command: settingeditor:save. |
| Ctrl + Shift + X | Show panel | Command: extensionmanager:show-panel. |
| Tab | Invoke file | Command: completer:invoke-file. |
| Ctrl + I | Toggle | Command: inspector:toggle. |
| Ctrl + Shift + L | Create | Command: launcher:create. |
| Ctrl + Shift + K | Show panel | Command: toc:show-panel. |
→ Related guide: Keyboard shortcuts every data scientist should know
Command mode
Press Esc to leave the cell editor; the cell border turns blue. Then A and B insert a cell above or below, DD (D twice) deletes the selected cell, M turns it into Markdown and Y back into code. C, X and V copy, cut and paste whole cells, and Shift with the arrow keys selects several so they can be moved or deleted together. Enter returns to Edit mode in the selected cell.
Running
Shift + Enter runs the cell and selects the next one — pressing it repeatedly walks down a notebook — while Ctrl + Enter runs and stays, which is what you want when re-running one cell while tuning a parameter. Alt + Enter runs and inserts an empty cell below. All three work in both modes. Interrupting a running cell is I, I in Command mode, and 0, 0 restarts the kernel.
Inside a cell
In Edit mode, Tab completes names from the running kernel and Shift + Tab shows a function's signature and docstring in a tooltip (press it again for more). Ctrl + / toggles a comment on the selected lines. Because the editor captures most keys in Edit mode, cell operations do not work there — if A inserts a letter instead of a cell, press Esc first.
Frequently Asked Questions
Can I combine Jupyter Notebook shortcuts with other tools?
Yes — use My Stack to combine Jupyter Notebook shortcuts with any other platform on this site into one printable reference, which is useful if your daily workflow spans several tools.
Do Jupyter Notebook shortcuts differ between Windows and Mac?
Most do not — the underlying key is the same, but Jupyter Notebook (like most software) maps Ctrl on Windows/Linux to Cmd on Mac for standard operations. Where a shortcut is platform-specific, this page notes the Mac variant next to the Windows one.